diff --git a/buildconfig/Setup.Emscripten.SDL2.in b/buildconfig/Setup.Emscripten.SDL2.in index 99fc298805..03d3f1bcdc 100644 --- a/buildconfig/Setup.Emscripten.SDL2.in +++ b/buildconfig/Setup.Emscripten.SDL2.in @@ -61,6 +61,7 @@ surflock src_c/void.c rect src_c/void.c rwobject src_c/void.c system src_c/void.c +_window src_c/void.c #_sdl2.controller src_c/_sdl2/controller.c $(SDL) $(DEBUG) -Isrc_c _sdl2.controller_old src_c/void.c diff --git a/buildconfig/Setup.SDL2.in b/buildconfig/Setup.SDL2.in index 569b8c1a5b..36e4b9ac03 100644 --- a/buildconfig/Setup.SDL2.in +++ b/buildconfig/Setup.SDL2.in @@ -75,3 +75,4 @@ math src_c/math.c $(SDL) $(DEBUG) pixelcopy src_c/pixelcopy.c $(SDL) $(DEBUG) newbuffer src_c/newbuffer.c $(SDL) $(DEBUG) system src_c/system.c $(SDL) $(DEBUG) +_window src_c/window.c $(SDL) $(DEBUG) diff --git a/buildconfig/stubs/gen_stubs.py b/buildconfig/stubs/gen_stubs.py index f8672ac7e7..d4251a4149 100644 --- a/buildconfig/stubs/gen_stubs.py +++ b/buildconfig/stubs/gen_stubs.py @@ -67,7 +67,7 @@ "font": ["Font"], "mixer": ["Channel"], "time": ["Clock"], - "joystick": ["Joystick"] + "joystick": ["Joystick"], } # pygame modules from which __init__.py does the equivalent of diff --git a/buildconfig/stubs/pygame/__init__.pyi b/buildconfig/stubs/pygame/__init__.pyi index db5ff9325d..b6dcf64ca5 100644 --- a/buildconfig/stubs/pygame/__init__.pyi +++ b/buildconfig/stubs/pygame/__init__.pyi @@ -639,6 +639,8 @@ from .constants import ( WINDOWMAXIMIZED as WINDOWMAXIMIZED, WINDOWMINIMIZED as WINDOWMINIMIZED, WINDOWMOVED as WINDOWMOVED, + WINDOWPOS_CENTERED as WINDOWPOS_CENTERED, + WINDOWPOS_UNDEFINED as WINDOWPOS_UNDEFINED, WINDOWRESIZED as WINDOWRESIZED, WINDOWRESTORED as WINDOWRESTORED, WINDOWSHOWN as WINDOWSHOWN, diff --git a/buildconfig/stubs/pygame/_sdl2/video.pyi b/buildconfig/stubs/pygame/_sdl2/video.pyi index b9e29ee286..64a4572148 100644 --- a/buildconfig/stubs/pygame/_sdl2/video.pyi +++ b/buildconfig/stubs/pygame/_sdl2/video.pyi @@ -1,4 +1,4 @@ -from typing import Any, Generator, Iterable, Optional, Tuple, Union +from typing import Any, Generator, Iterable, Optional, Tuple, Union, final from pygame.color import Color from pygame.rect import Rect @@ -38,6 +38,7 @@ def messagebox( escape_button: int = 0, ) -> int: ... +@final class Window: DEFAULT_SIZE: Tuple[Literal[640], Literal[480]] def __init__( @@ -73,6 +74,8 @@ class Window: display_index: int def set_modal_for(self, Window) -> None: ... +_Window = Window + class Texture: def __init__( self, @@ -153,14 +156,14 @@ class Image: class Renderer: def __init__( self, - window: Window, + window: Union[Window,_Window], index: int = -1, accelerated: int = -1, vsync: bool = False, target_texture: bool = False, ) -> None: ... @classmethod - def from_window(cls, window: Window) -> Renderer: ... + def from_window(cls, window: Union[Window,_Window]) -> Renderer: ... draw_blend_mode: int draw_color: Color def clear(self) -> None: ... diff --git a/buildconfig/stubs/pygame/_sdl2/window.pyi b/buildconfig/stubs/pygame/_sdl2/window.pyi new file mode 100644 index 0000000000..23b997ea88 --- /dev/null +++ b/buildconfig/stubs/pygame/_sdl2/window.pyi @@ -0,0 +1 @@ +from pygame._sdl2.video import _Window as Window diff --git a/buildconfig/stubs/pygame/_window.pyi b/buildconfig/stubs/pygame/_window.pyi new file mode 100644 index 0000000000..da24050083 --- /dev/null +++ b/buildconfig/stubs/pygame/_window.pyi @@ -0,0 +1,38 @@ +from typing import Iterable, Optional, Tuple, Union, final +from pygame.surface import Surface +from ._common import RectValue +from pygame.locals import WINDOWPOS_UNDEFINED + +def get_grabbed_window() -> Optional[Window]: ... +@final +class Window: + def __init__( + self, + title: str = "pygame window", + size: Iterable[int] = (640, 480), + position: Union[int, Iterable[int]] = WINDOWPOS_UNDEFINED, + **flags: bool + ) -> None: ... + def destroy(self) -> None: ... + def set_windowed(self) -> None: ... + def set_fullscreen(self, desktop: bool = False) -> None: ... + def focus(self, input_only: bool = False) -> None: ... + def hide(self) -> None: ... + def show(self) -> None: ... + def restore(self) -> None: ... + def maximize(self) -> None: ... + def minimize(self) -> None: ... + def set_modal_for(self, parent: Window) -> None: ... + def set_icon(self, icon: Surface) -> None: ... + grab: bool + title: str + resizable: bool + borderless: bool + relative_mouse: bool + id: int + size: Iterable[int] + position: Union[int, Iterable[int]] + opacity: float + display_index: int + @classmethod + def from_display_module(cls) -> Window: ... diff --git a/buildconfig/stubs/pygame/constants.pyi b/buildconfig/stubs/pygame/constants.pyi index 82da356874..8af12d299c 100644 --- a/buildconfig/stubs/pygame/constants.pyi +++ b/buildconfig/stubs/pygame/constants.pyi @@ -561,6 +561,8 @@ WINDOWLEAVE: int WINDOWMAXIMIZED: int WINDOWMINIMIZED: int WINDOWMOVED: int +WINDOWPOS_CENTERED: int +WINDOWPOS_UNDEFINED: int WINDOWRESIZED: int WINDOWRESTORED: int WINDOWSHOWN: int diff --git a/buildconfig/stubs/pygame/locals.pyi b/buildconfig/stubs/pygame/locals.pyi index d51f06de24..07f050273f 100644 --- a/buildconfig/stubs/pygame/locals.pyi +++ b/buildconfig/stubs/pygame/locals.pyi @@ -563,6 +563,8 @@ WINDOWLEAVE: int WINDOWMAXIMIZED: int WINDOWMINIMIZED: int WINDOWMOVED: int +WINDOWPOS_CENTERED: int +WINDOWPOS_UNDEFINED: int WINDOWRESIZED: int WINDOWRESTORED: int WINDOWSHOWN: int diff --git a/docs/reST/c_api.rst b/docs/reST/c_api.rst index 734289f0ad..a816276fc7 100644 --- a/docs/reST/c_api.rst +++ b/docs/reST/c_api.rst @@ -18,6 +18,7 @@ pygame C API c_api/surface.rst c_api/surflock.rst c_api/version.rst + c_api/window.rst src_c/include/ contains header files for applications diff --git a/docs/reST/c_api/window.rst b/docs/reST/c_api/window.rst new file mode 100644 index 0000000000..4ab8f083a2 --- /dev/null +++ b/docs/reST/c_api/window.rst @@ -0,0 +1,30 @@ +.. include:: ../common.txt + +.. highlight:: c + +************************************************ + Class Window API exported by pygame.window +************************************************ + +src_c/window.c +=============== + +This extension module defines Python type :py:class:`pygame.Window`. + +Header file: src_c/include/pygame.h + + +.. c:type:: pgWindowObject + + A :py:class:`pygame.window.Window` instance. + +.. c:var:: PyTypeObject *pgWindow_Type + + The :py:class:`pygame.window.Window` Python type. + +.. c:function:: int pgWindow_Check(PyObject *x) + + Return true if *x* is a :py:class:`pygame.window.Window` instance + + Will return false if *x* is not a subclass of `Window`. + This is a macro. No check is made that *x* is not *NULL*. diff --git a/src_c/_pygame.h b/src_c/_pygame.h index 419454460d..ecaecd1484 100644 --- a/src_c/_pygame.h +++ b/src_c/_pygame.h @@ -341,5 +341,6 @@ struct pgColorObject { #define PYGAMEAPI_MATH_NUMSLOTS 2 #define PYGAMEAPI_BASE_NUMSLOTS 24 #define PYGAMEAPI_EVENT_NUMSLOTS 6 +#define PYGAMEAPI_WINDOW_NUMSLOTS 1 #endif /* _PYGAME_INTERNAL_H */ diff --git a/src_c/_sdl2/video.c b/src_c/_sdl2/video.c index 8911481853..7180c9191a 100644 --- a/src_c/_sdl2/video.c +++ b/src_c/_sdl2/video.c @@ -1,4 +1,4 @@ -/* Generated by Cython 0.29.30 */ +/* Generated by Cython 0.29.33 */ /* BEGIN: Cython Metadata { @@ -22,8 +22,8 @@ END: Cython Metadata */ #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) #error Cython requires Python 2.6+ or Python 3.3+. #else -#define CYTHON_ABI "0_29_30" -#define CYTHON_HEX_VERSION 0x001D1EF0 +#define CYTHON_ABI "0_29_33" +#define CYTHON_HEX_VERSION 0x001D21F0 #define CYTHON_FUTURE_DIVISION 1 #include #ifndef offsetof @@ -62,6 +62,7 @@ END: Cython Metadata */ #define CYTHON_COMPILING_IN_PYPY 1 #define CYTHON_COMPILING_IN_PYSTON 0 #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_NOGIL 0 #undef CYTHON_USE_TYPE_SLOTS #define CYTHON_USE_TYPE_SLOTS 0 #undef CYTHON_USE_PYTYPE_LOOKUP @@ -99,12 +100,13 @@ END: Cython Metadata */ #undef CYTHON_USE_EXC_INFO_STACK #define CYTHON_USE_EXC_INFO_STACK 0 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC - #define CYTHON_UPDATE_DESCRIPTOR_DOC (PYPY_VERSION_HEX >= 0x07030900) + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 #endif #elif defined(PYSTON_VERSION) #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_PYSTON 1 #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_NOGIL 0 #ifndef CYTHON_USE_TYPE_SLOTS #define CYTHON_USE_TYPE_SLOTS 1 #endif @@ -145,10 +147,56 @@ END: Cython Metadata */ #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 #endif +#elif defined(PY_NOGIL) + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_PYSTON 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_NOGIL 1 + #ifndef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #endif + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #ifndef CYTHON_USE_ASYNC_SLOTS + #define CYTHON_USE_ASYNC_SLOTS 1 + #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 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 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_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #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 #else #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_PYSTON 0 #define CYTHON_COMPILING_IN_CPYTHON 1 + #define CYTHON_COMPILING_IN_NOGIL 0 #ifndef CYTHON_USE_TYPE_SLOTS #define CYTHON_USE_TYPE_SLOTS 1 #endif @@ -517,11 +565,11 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { #endif #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) #define CYTHON_PEP393_ENABLED 1 - #if defined(PyUnicode_IS_READY) - #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ - 0 : _PyUnicode_Ready((PyObject *)(op))) + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_READY(op) (0) #else - #define __Pyx_PyUnicode_READY(op) (0) + #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) @@ -530,14 +578,14 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { #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, ch) - #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE) - #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 + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) #else - #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) + #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 @@ -961,7 +1009,7 @@ static const char *__pyx_f[] = { }; /*--- Type declarations ---*/ -struct __pyx_obj_6pygame_5_sdl2_5video_Window; +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; @@ -971,7 +1019,7 @@ 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":524 +/* "pygame/_sdl2/video.pxd":530 * * cpdef object get_viewport(self) * cpdef object blit(self, object source, Rect dest=*, Rect area=*, int special_flags=*) # <<<<<<<<<<<<<< @@ -985,7 +1033,7 @@ struct __pyx_opt_args_6pygame_5_sdl2_5video_8Renderer_blit { int special_flags; }; -/* "pygame/_sdl2/video.pxd":533 +/* "pygame/_sdl2/video.pxd":539 * cdef readonly int height * * cdef draw_internal(self, SDL_Rect *csrcrect, SDL_Rect *cdstrect, float angle=*, SDL_Point *originptr=*, # <<<<<<<<<<<<<< @@ -1000,7 +1048,7 @@ struct __pyx_opt_args_6pygame_5_sdl2_5video_7Texture_draw_internal { int flip_y; }; -/* "pygame/_sdl2/video.pxd":535 +/* "pygame/_sdl2/video.pxd":541 * 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=*, # <<<<<<<<<<<<<< @@ -1017,7 +1065,7 @@ struct __pyx_opt_args_6pygame_5_sdl2_5video_7Texture_draw { int flip_y; }; -/* "pygame/_sdl2/video.pxd":551 +/* "pygame/_sdl2/video.pxd":557 * cdef public Rect srcrect * * cpdef void draw(self, srcrect=*, dstrect=*) # <<<<<<<<<<<<<< @@ -1028,21 +1076,21 @@ struct __pyx_opt_args_6pygame_5_sdl2_5video_5Image_draw { PyObject *dstrect; }; -/* "pygame/_sdl2/video.pxd":512 - * +/* "pygame/_sdl2/video.pxd":518 + * void import_pygame_window() * - * cdef class Window: # <<<<<<<<<<<<<< + * cdef class _Window: # <<<<<<<<<<<<<< * cdef SDL_Window* _win * cdef int _is_borrowed */ -struct __pyx_obj_6pygame_5_sdl2_5video_Window { +struct __pyx_obj_6pygame_5_sdl2_5video__Window { PyObject_HEAD SDL_Window *_win; int _is_borrowed; }; -/* "pygame/_sdl2/video.pxd":516 +/* "pygame/_sdl2/video.pxd":522 * cdef int _is_borrowed * * cdef class Renderer: # <<<<<<<<<<<<<< @@ -1055,12 +1103,12 @@ struct __pyx_obj_6pygame_5_sdl2_5video_Renderer { SDL_Renderer *_renderer; pgColorObject *_draw_color; struct __pyx_obj_6pygame_5_sdl2_5video_Texture *_target; - struct __pyx_obj_6pygame_5_sdl2_5video_Window *_win; + pgWindowObject *_win; int _is_borrowed; }; -/* "pygame/_sdl2/video.pxd":526 +/* "pygame/_sdl2/video.pxd":532 * cpdef object blit(self, object source, Rect dest=*, Rect area=*, int special_flags=*) * * cdef class Texture: # <<<<<<<<<<<<<< @@ -1078,7 +1126,7 @@ struct __pyx_obj_6pygame_5_sdl2_5video_Texture { }; -/* "pygame/_sdl2/video.pxd":538 +/* "pygame/_sdl2/video.pxd":544 * bint flip_x=*, bint flip_y=*) * * cdef class Image: # <<<<<<<<<<<<<< @@ -1101,7 +1149,7 @@ struct __pyx_obj_6pygame_5_sdl2_5video_Image { }; -/* "pygame/_sdl2/video.pyx":34 +/* "pygame/_sdl2/video.pyx":35 * ) * * def get_drivers(): # <<<<<<<<<<<<<< @@ -1119,7 +1167,7 @@ struct __pyx_obj_6pygame_5_sdl2_5video___pyx_scope_struct__get_drivers { -/* "pygame/_sdl2/video.pyx":1123 +/* "pygame/_sdl2/video.pyx":1125 * * * cdef class Renderer: # <<<<<<<<<<<<<< @@ -1134,7 +1182,7 @@ struct __pyx_vtabstruct_6pygame_5_sdl2_5video_Renderer { static struct __pyx_vtabstruct_6pygame_5_sdl2_5video_Renderer *__pyx_vtabptr_6pygame_5_sdl2_5video_Renderer; -/* "pygame/_sdl2/video.pyx":538 +/* "pygame/_sdl2/video.pyx":540 * * * cdef class Texture: # <<<<<<<<<<<<<< @@ -1149,7 +1197,7 @@ struct __pyx_vtabstruct_6pygame_5_sdl2_5video_Texture { static struct __pyx_vtabstruct_6pygame_5_sdl2_5video_Texture *__pyx_vtabptr_6pygame_5_sdl2_5video_Texture; -/* "pygame/_sdl2/video.pyx":969 +/* "pygame/_sdl2/video.pyx":971 * raise error() * * cdef class Image: # <<<<<<<<<<<<<< @@ -1264,18 +1312,18 @@ static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UIN /* GetModuleGlobalName.proto */ #if CYTHON_USE_DICT_VERSIONS -#define __Pyx_GetModuleGlobalName(var, name) {\ +#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);\ -} -#define __Pyx_GetModuleGlobalNameUncached(var, name) {\ +} 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) @@ -1742,6 +1790,9 @@ static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict, PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass); +/* Globals.proto */ +static PyObject* __Pyx_Globals(void); + /* ClassMethod.proto */ #include "descrobject.h" static CYTHON_UNUSED PyObject* __Pyx_Method_ClassMethod(PyObject *method); @@ -1946,6 +1997,8 @@ static PyObject *__pyx_f_6pygame_5_sdl2_5video_8Renderer_blit(struct __pyx_obj_6 /* Module declarations from 'pygame' */ +/* Module declarations from 'pygame._window' */ + /* Module declarations from 'cpython.version' */ /* Module declarations from '__builtin__' */ @@ -2031,6 +2084,7 @@ static PyTypeObject *__pyx_ptype_7cpython_7complex_complex = 0; static PyTypeObject *__pyx_ptype_6pygame_5_sdl2_5video_Color = 0; static PyTypeObject *__pyx_ptype_6pygame_5_sdl2_5video_Rect = 0; static PyTypeObject *__pyx_ptype_6pygame_5_sdl2_5video_Window = 0; +static PyTypeObject *__pyx_ptype_6pygame_5_sdl2_5video__Window = 0; static PyTypeObject *__pyx_ptype_6pygame_5_sdl2_5video_Renderer = 0; static PyTypeObject *__pyx_ptype_6pygame_5_sdl2_5video_Texture = 0; static PyTypeObject *__pyx_ptype_6pygame_5_sdl2_5video_Image = 0; @@ -2108,7 +2162,7 @@ static const char __pyx_k_p4_xy[] = "p4_xy"; 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_Window[] = "_Window"; static const char __pyx_k_button[] = "button"; static const char __pyx_k_encode[] = "encode"; static const char __pyx_k_flip_x[] = "flip_x"; @@ -2147,6 +2201,7 @@ 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_Window_2[] = "Window"; static const char __pyx_k_buttonid[] = "buttonid"; static const char __pyx_k_errorfnc[] = "errorfnc"; static const char __pyx_k_get_rect[] = "get_rect"; @@ -2245,6 +2300,7 @@ static const char __pyx_k_s_name_s_flags_0x_02x_num_textu[] = "<%s(name: %s, fla 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_Argument_window_has_incorrect_ty[] = "Argument 'window' has incorrect type (expected pygame.Window or pygame._sdl2._Window, got %s)"; static const char __pyx_k_area_must_be_a_rectangle_or_None[] = "area must be a rectangle or None"; static const char __pyx_k_draw_quad_requires_SDL_2_0_18_or[] = "draw_quad requires SDL 2.0.18 or newer"; static const char __pyx_k_draw_triangle_requires_SDL_2_0_1[] = "draw_triangle requires SDL 2.0.18 or newer"; @@ -2262,6 +2318,7 @@ static const char __pyx_k_surface_must_be_a_Surface_object[] = "surface must be 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."; static PyObject *__pyx_kp_s_2nd_argument_must_be_a_surface; +static PyObject *__pyx_kp_s_Argument_window_has_incorrect_ty; static PyObject *__pyx_n_s_DEFAULT_SIZE; static PyObject *__pyx_n_s_Image; static PyObject *__pyx_n_s_KeyError; @@ -2282,6 +2339,7 @@ static PyObject *__pyx_n_s_ValueError; static PyObject *__pyx_n_s_WINDOWPOS_CENTERED; static PyObject *__pyx_n_s_WINDOWPOS_UNDEFINED; static PyObject *__pyx_n_s_Window; +static PyObject *__pyx_n_s_Window_2; static PyObject *__pyx_n_s_accelerated; static PyObject *__pyx_n_s_allow_highdpi; static PyObject *__pyx_n_s_alpha; @@ -2477,41 +2535,41 @@ static PyObject *__pyx_n_s_y; 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_display_module(PyTypeObject *__pyx_v_cls); /* proto */ -static int __pyx_pf_6pygame_5_sdl2_5video_6Window_2__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_4set_windowed(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_6set_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_8destroy(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_10hide(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_12show(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_14focus(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_16restore(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_18maximize(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_20minimize(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_22set_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_24set_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_26__dealloc__(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_28__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_30__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5messagebox(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_title, PyObject *__pyx_v_message, pgWindowObject *__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_7_Window_from_display_module(PyTypeObject *__pyx_v_cls); /* proto */ +static int __pyx_pf_6pygame_5_sdl2_5video_7_Window_2__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_7_Window_4grab___get__(struct __pyx_obj_6pygame_5_sdl2_5video__Window *__pyx_v_self); /* proto */ +static int __pyx_pf_6pygame_5_sdl2_5video_7_Window_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_7_Window_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_7_Window_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_7_Window_4set_windowed(struct __pyx_obj_6pygame_5_sdl2_5video__Window *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7_Window_6set_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_7_Window_5title___get__(struct __pyx_obj_6pygame_5_sdl2_5video__Window *__pyx_v_self); /* proto */ +static int __pyx_pf_6pygame_5_sdl2_5video_7_Window_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_7_Window_8destroy(struct __pyx_obj_6pygame_5_sdl2_5video__Window *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7_Window_10hide(struct __pyx_obj_6pygame_5_sdl2_5video__Window *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7_Window_12show(struct __pyx_obj_6pygame_5_sdl2_5video__Window *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7_Window_14focus(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_7_Window_16restore(struct __pyx_obj_6pygame_5_sdl2_5video__Window *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7_Window_18maximize(struct __pyx_obj_6pygame_5_sdl2_5video__Window *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7_Window_20minimize(struct __pyx_obj_6pygame_5_sdl2_5video__Window *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7_Window_9resizable___get__(struct __pyx_obj_6pygame_5_sdl2_5video__Window *__pyx_v_self); /* proto */ +static int __pyx_pf_6pygame_5_sdl2_5video_7_Window_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_7_Window_10borderless___get__(struct __pyx_obj_6pygame_5_sdl2_5video__Window *__pyx_v_self); /* proto */ +static int __pyx_pf_6pygame_5_sdl2_5video_7_Window_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_7_Window_22set_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_7_Window_2id___get__(struct __pyx_obj_6pygame_5_sdl2_5video__Window *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7_Window_4size___get__(struct __pyx_obj_6pygame_5_sdl2_5video__Window *__pyx_v_self); /* proto */ +static int __pyx_pf_6pygame_5_sdl2_5video_7_Window_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_7_Window_8position___get__(struct __pyx_obj_6pygame_5_sdl2_5video__Window *__pyx_v_self); /* proto */ +static int __pyx_pf_6pygame_5_sdl2_5video_7_Window_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_7_Window_7opacity___get__(struct __pyx_obj_6pygame_5_sdl2_5video__Window *__pyx_v_self); /* proto */ +static int __pyx_pf_6pygame_5_sdl2_5video_7_Window_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_7_Window_13display_index___get__(struct __pyx_obj_6pygame_5_sdl2_5video__Window *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7_Window_24set_modal_for(struct __pyx_obj_6pygame_5_sdl2_5video__Window *__pyx_v_self, pgWindowObject *__pyx_v_parent); /* proto */ +static void __pyx_pf_6pygame_5_sdl2_5video_7_Window_26__dealloc__(struct __pyx_obj_6pygame_5_sdl2_5video__Window *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7_Window_28__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pygame_5_sdl2_5video__Window *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7_Window_30__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, PyObject *__pyx_v_scale_quality); /* 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 */ @@ -2558,8 +2616,8 @@ static int __pyx_pf_6pygame_5_sdl2_5video_5Image_7srcrect_2__set__(struct __pyx_ 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 PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_from_window(PyTypeObject *__pyx_v_cls, PyObject *__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, PyObject *__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 */ @@ -2588,7 +2646,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_32to_surface(struct __ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_34compose_custom_blend_mode(PyObject *__pyx_v_color_mode, PyObject *__pyx_v_alpha_mode); /* proto */ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_36__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_38__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__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*/ @@ -2656,7 +2714,7 @@ static PyObject *__pyx_codeobj__50; static PyObject *__pyx_codeobj__52; /* Late includes */ -/* "pygame/_sdl2/video.pyx":24 +/* "pygame/_sdl2/video.pyx":25 * * class RendererDriverInfo: * def __repr__(self): # <<<<<<<<<<<<<< @@ -2693,7 +2751,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_18RendererDriverInfo___repr__(CY int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 0); - /* "pygame/_sdl2/video.pyx":25 + /* "pygame/_sdl2/video.pyx":26 * class RendererDriverInfo: * def __repr__(self): * return "<%s(name: %s, flags: 0x%02x, num_texture_formats: %d, max_texture_width: %d, max_texture_height: %d)>" % ( # <<<<<<<<<<<<<< @@ -2702,77 +2760,77 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_18RendererDriverInfo___repr__(CY */ __Pyx_XDECREF(__pyx_r); - /* "pygame/_sdl2/video.pyx":26 + /* "pygame/_sdl2/video.pyx":27 * 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, 26, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27, __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, 26, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 27, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sdl2/video.pyx":27 + /* "pygame/_sdl2/video.pyx":28 * 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, 27, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 28, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - /* "pygame/_sdl2/video.pyx":28 + /* "pygame/_sdl2/video.pyx":29 * 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, 28, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_flags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - /* "pygame/_sdl2/video.pyx":29 + /* "pygame/_sdl2/video.pyx":30 * 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, 29, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_num_texture_formats); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 30, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - /* "pygame/_sdl2/video.pyx":30 + /* "pygame/_sdl2/video.pyx":31 * 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, 30, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_max_texture_width); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 31, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - /* "pygame/_sdl2/video.pyx":31 + /* "pygame/_sdl2/video.pyx":32 * 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, 31, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_max_texture_height); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 32, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - /* "pygame/_sdl2/video.pyx":26 + /* "pygame/_sdl2/video.pyx":27 * 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, 26, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 27, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); @@ -2793,21 +2851,21 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_18RendererDriverInfo___repr__(CY __pyx_t_5 = 0; __pyx_t_6 = 0; - /* "pygame/_sdl2/video.pyx":25 + /* "pygame/_sdl2/video.pyx":26 * 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, 25, __pyx_L1_error) + __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, 26, __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":24 + /* "pygame/_sdl2/video.pyx":25 * * class RendererDriverInfo: * def __repr__(self): # <<<<<<<<<<<<<< @@ -2833,7 +2891,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_18RendererDriverInfo___repr__(CY } 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":34 +/* "pygame/_sdl2/video.pyx":35 * ) * * def get_drivers(): # <<<<<<<<<<<<<< @@ -2868,12 +2926,12 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_get_drivers(CYTHON_UNUSED PyObje 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, 34, __pyx_L1_error) + __PYX_ERR(0, 35, __pyx_L1_error) } else { __Pyx_GOTREF(__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, 34, __pyx_L1_error) + __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, 35, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -2911,9 +2969,9 @@ static PyObject *__pyx_gb_6pygame_5_sdl2_5video_2generator(__pyx_CoroutineObject return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 34, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 35, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":37 + /* "pygame/_sdl2/video.pyx":38 * """Yield info about the rendering drivers available for Renderer objects * """ * cdef int num = SDL_GetNumRenderDrivers() # <<<<<<<<<<<<<< @@ -2922,7 +2980,7 @@ static PyObject *__pyx_gb_6pygame_5_sdl2_5video_2generator(__pyx_CoroutineObject */ __pyx_cur_scope->__pyx_v_num = SDL_GetNumRenderDrivers(); - /* "pygame/_sdl2/video.pyx":40 + /* "pygame/_sdl2/video.pyx":41 * cdef SDL_RendererInfo info * cdef int ind * for ind from 0 <= ind < num: # <<<<<<<<<<<<<< @@ -2932,7 +2990,7 @@ static PyObject *__pyx_gb_6pygame_5_sdl2_5video_2generator(__pyx_CoroutineObject __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":41 + /* "pygame/_sdl2/video.pyx":42 * cdef int ind * for ind from 0 <= ind < num: * SDL_GetRenderDriverInfo(ind, &info) # <<<<<<<<<<<<<< @@ -2941,14 +2999,14 @@ static PyObject *__pyx_gb_6pygame_5_sdl2_5video_2generator(__pyx_CoroutineObject */ (void)(SDL_GetRenderDriverInfo(__pyx_cur_scope->__pyx_v_ind, (&__pyx_cur_scope->__pyx_v_info))); - /* "pygame/_sdl2/video.pyx":42 + /* "pygame/_sdl2/video.pyx":43 * 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, 42, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_RendererDriverInfo); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 43, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { @@ -2962,7 +3020,7 @@ static PyObject *__pyx_gb_6pygame_5_sdl2_5video_2generator(__pyx_CoroutineObject } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 42, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __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); @@ -2970,7 +3028,7 @@ static PyObject *__pyx_gb_6pygame_5_sdl2_5video_2generator(__pyx_CoroutineObject __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sdl2/video.pyx":43 + /* "pygame/_sdl2/video.pyx":44 * SDL_GetRenderDriverInfo(ind, &info) * ret = RendererDriverInfo() * ret.name = info.name.decode("utf-8") # <<<<<<<<<<<<<< @@ -2978,60 +3036,60 @@ static PyObject *__pyx_gb_6pygame_5_sdl2_5video_2generator(__pyx_CoroutineObject * ret.num_texture_formats = info.num_texture_formats */ __pyx_t_5 = __pyx_cur_scope->__pyx_v_info.name; - __pyx_t_2 = __Pyx_decode_c_string(__pyx_t_5, 0, strlen(__pyx_t_5), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L1_error) + __pyx_t_2 = __Pyx_decode_c_string(__pyx_t_5, 0, strlen(__pyx_t_5), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 44, __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, 43, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_cur_scope->__pyx_v_ret, __pyx_n_s_name_2, __pyx_t_2) < 0) __PYX_ERR(0, 44, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sdl2/video.pyx":44 + /* "pygame/_sdl2/video.pyx":45 * 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, 44, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_Uint32(__pyx_cur_scope->__pyx_v_info.flags); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 45, __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, 44, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_cur_scope->__pyx_v_ret, __pyx_n_s_flags, __pyx_t_2) < 0) __PYX_ERR(0, 45, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sdl2/video.pyx":45 + /* "pygame/_sdl2/video.pyx":46 * 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, 45, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_Uint32(__pyx_cur_scope->__pyx_v_info.num_texture_formats); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 46, __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, 45, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_cur_scope->__pyx_v_ret, __pyx_n_s_num_texture_formats, __pyx_t_2) < 0) __PYX_ERR(0, 46, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sdl2/video.pyx":46 + /* "pygame/_sdl2/video.pyx":47 * 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, 46, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_info.max_texture_width); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 47, __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, 46, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_cur_scope->__pyx_v_ret, __pyx_n_s_max_texture_width, __pyx_t_2) < 0) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sdl2/video.pyx":47 + /* "pygame/_sdl2/video.pyx":48 * 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, 47, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_info.max_texture_height); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 48, __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, 47, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_cur_scope->__pyx_v_ret, __pyx_n_s_max_texture_height, __pyx_t_2) < 0) __PYX_ERR(0, 48, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sdl2/video.pyx":48 + /* "pygame/_sdl2/video.pyx":49 * ret.max_texture_width = info.max_texture_width * ret.max_texture_height = info.max_texture_height * yield ret # <<<<<<<<<<<<<< @@ -3049,11 +3107,11 @@ static PyObject *__pyx_gb_6pygame_5_sdl2_5video_2generator(__pyx_CoroutineObject 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, 48, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 49, __pyx_L1_error) } CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "pygame/_sdl2/video.pyx":34 + /* "pygame/_sdl2/video.pyx":35 * ) * * def get_drivers(): # <<<<<<<<<<<<<< @@ -3080,7 +3138,7 @@ static PyObject *__pyx_gb_6pygame_5_sdl2_5video_2generator(__pyx_CoroutineObject return __pyx_r; } -/* "pygame/_sdl2/video.pyx":51 +/* "pygame/_sdl2/video.pyx":52 * * * def get_grabbed_window(): # <<<<<<<<<<<<<< @@ -3111,7 +3169,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_3get_grabbed_window(CYTHON_UNUSE int __pyx_t_1; __Pyx_RefNannySetupContext("get_grabbed_window", 0); - /* "pygame/_sdl2/video.pyx":57 + /* "pygame/_sdl2/video.pyx":58 * otherwise ``None`` is returned. * """ * cdef SDL_Window *win = SDL_GetGrabbedWindow() # <<<<<<<<<<<<<< @@ -3120,7 +3178,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_3get_grabbed_window(CYTHON_UNUSE */ __pyx_v_win = SDL_GetGrabbedWindow(); - /* "pygame/_sdl2/video.pyx":59 + /* "pygame/_sdl2/video.pyx":60 * cdef SDL_Window *win = SDL_GetGrabbedWindow() * cdef void *ptr * if win: # <<<<<<<<<<<<<< @@ -3130,7 +3188,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_3get_grabbed_window(CYTHON_UNUSE __pyx_t_1 = (__pyx_v_win != 0); if (__pyx_t_1) { - /* "pygame/_sdl2/video.pyx":60 + /* "pygame/_sdl2/video.pyx":61 * cdef void *ptr * if win: * ptr = SDL_GetWindowData(win, "pg_window") # <<<<<<<<<<<<<< @@ -3139,7 +3197,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_3get_grabbed_window(CYTHON_UNUSE */ __pyx_v_ptr = SDL_GetWindowData(__pyx_v_win, ((char const *)"pg_window")); - /* "pygame/_sdl2/video.pyx":61 + /* "pygame/_sdl2/video.pyx":62 * if win: * ptr = SDL_GetWindowData(win, "pg_window") * if not ptr: # <<<<<<<<<<<<<< @@ -3149,7 +3207,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_3get_grabbed_window(CYTHON_UNUSE __pyx_t_1 = ((!(__pyx_v_ptr != 0)) != 0); if (__pyx_t_1) { - /* "pygame/_sdl2/video.pyx":62 + /* "pygame/_sdl2/video.pyx":63 * ptr = SDL_GetWindowData(win, "pg_window") * if not ptr: * return None # <<<<<<<<<<<<<< @@ -3160,7 +3218,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_3get_grabbed_window(CYTHON_UNUSE __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "pygame/_sdl2/video.pyx":61 + /* "pygame/_sdl2/video.pyx":62 * if win: * ptr = SDL_GetWindowData(win, "pg_window") * if not ptr: # <<<<<<<<<<<<<< @@ -3169,7 +3227,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_3get_grabbed_window(CYTHON_UNUSE */ } - /* "pygame/_sdl2/video.pyx":63 + /* "pygame/_sdl2/video.pyx":64 * if not ptr: * return None * return ptr # <<<<<<<<<<<<<< @@ -3181,7 +3239,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_3get_grabbed_window(CYTHON_UNUSE __pyx_r = ((PyObject *)__pyx_v_ptr); goto __pyx_L0; - /* "pygame/_sdl2/video.pyx":59 + /* "pygame/_sdl2/video.pyx":60 * cdef SDL_Window *win = SDL_GetGrabbedWindow() * cdef void *ptr * if win: # <<<<<<<<<<<<<< @@ -3190,7 +3248,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_3get_grabbed_window(CYTHON_UNUSE */ } - /* "pygame/_sdl2/video.pyx":64 + /* "pygame/_sdl2/video.pyx":65 * return None * return ptr * return None # <<<<<<<<<<<<<< @@ -3201,7 +3259,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_3get_grabbed_window(CYTHON_UNUSE __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "pygame/_sdl2/video.pyx":51 + /* "pygame/_sdl2/video.pyx":52 * * * def get_grabbed_window(): # <<<<<<<<<<<<<< @@ -3216,7 +3274,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_3get_grabbed_window(CYTHON_UNUSE return __pyx_r; } -/* "pygame/_sdl2/video.pyx":66 +/* "pygame/_sdl2/video.pyx":67 * return None * * def messagebox(title, message, # <<<<<<<<<<<<<< @@ -3231,7 +3289,7 @@ static PyMethodDef __pyx_mdef_6pygame_5_sdl2_5video_6messagebox = {"messagebox", static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6messagebox(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_title = 0; PyObject *__pyx_v_message = 0; - struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_window = 0; + pgWindowObject *__pyx_v_window = 0; int __pyx_v_info; int __pyx_v_warn; int __pyx_v_error; @@ -3248,16 +3306,16 @@ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6messagebox(PyObject *__pyx_self static 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}; PyObject* values[9] = {0,0,0,0,0,0,0,0,0}; - /* "pygame/_sdl2/video.pyx":67 + /* "pygame/_sdl2/video.pyx":68 * * def messagebox(title, message, * Window window=None, # <<<<<<<<<<<<<< * bint info=False, * bint warn=False, */ - values[2] = (PyObject *)((struct __pyx_obj_6pygame_5_sdl2_5video_Window *)Py_None); + values[2] = (PyObject *)((pgWindowObject *)Py_None); - /* "pygame/_sdl2/video.pyx":71 + /* "pygame/_sdl2/video.pyx":72 * bint warn=False, * bint error=False, * buttons=('OK', ), # <<<<<<<<<<<<<< @@ -3301,7 +3359,7 @@ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6messagebox(PyObject *__pyx_self case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_message)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("messagebox", 0, 2, 9, 1); __PYX_ERR(0, 66, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("messagebox", 0, 2, 9, 1); __PYX_ERR(0, 67, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -3347,7 +3405,7 @@ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6messagebox(PyObject *__pyx_self } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "messagebox") < 0)) __PYX_ERR(0, 66, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "messagebox") < 0)) __PYX_ERR(0, 67, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -3373,12 +3431,12 @@ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6messagebox(PyObject *__pyx_self } __pyx_v_title = values[0]; __pyx_v_message = values[1]; - __pyx_v_window = ((struct __pyx_obj_6pygame_5_sdl2_5video_Window *)values[2]); + __pyx_v_window = ((pgWindowObject *)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, 68, __pyx_L3_error) + __pyx_v_info = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_info == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 69, __pyx_L3_error) } else { - /* "pygame/_sdl2/video.pyx":68 + /* "pygame/_sdl2/video.pyx":69 * def messagebox(title, message, * Window window=None, * bint info=False, # <<<<<<<<<<<<<< @@ -3388,10 +3446,10 @@ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6messagebox(PyObject *__pyx_self __pyx_v_info = ((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, 69, __pyx_L3_error) + __pyx_v_warn = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_warn == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 70, __pyx_L3_error) } else { - /* "pygame/_sdl2/video.pyx":69 + /* "pygame/_sdl2/video.pyx":70 * Window window=None, * bint info=False, * bint warn=False, # <<<<<<<<<<<<<< @@ -3401,10 +3459,10 @@ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6messagebox(PyObject *__pyx_self __pyx_v_warn = ((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, 70, __pyx_L3_error) + __pyx_v_error = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_error == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 71, __pyx_L3_error) } else { - /* "pygame/_sdl2/video.pyx":70 + /* "pygame/_sdl2/video.pyx":71 * bint info=False, * bint warn=False, * bint error=False, # <<<<<<<<<<<<<< @@ -3419,16 +3477,16 @@ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6messagebox(PyObject *__pyx_self } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("messagebox", 0, 2, 9, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 66, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("messagebox", 0, 2, 9, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 67, __pyx_L3_error) __pyx_L3_error:; __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, 67, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_window), __pyx_ptype_6pygame_5_sdl2_5video_Window, 1, "window", 0))) __PYX_ERR(0, 68, __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":66 + /* "pygame/_sdl2/video.pyx":67 * return None * * def messagebox(title, message, # <<<<<<<<<<<<<< @@ -3445,7 +3503,7 @@ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6messagebox(PyObject *__pyx_self 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) { +static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5messagebox(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_title, PyObject *__pyx_v_message, pgWindowObject *__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; @@ -3478,7 +3536,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5messagebox(CYTHON_UNUSED PyObje __Pyx_INCREF(__pyx_v_title); __Pyx_INCREF(__pyx_v_message); - /* "pygame/_sdl2/video.pyx":90 + /* "pygame/_sdl2/video.pyx":91 * # TODO: type check * # TODO: color scheme * cdef SDL_MessageBoxButtonData* c_buttons = NULL # <<<<<<<<<<<<<< @@ -3487,7 +3545,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5messagebox(CYTHON_UNUSED PyObje */ __pyx_v_c_buttons = NULL; - /* "pygame/_sdl2/video.pyx":93 + /* "pygame/_sdl2/video.pyx":94 * * cdef SDL_MessageBoxData data * data.flags = 0 # <<<<<<<<<<<<<< @@ -3496,7 +3554,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5messagebox(CYTHON_UNUSED PyObje */ __pyx_v_data.flags = 0; - /* "pygame/_sdl2/video.pyx":94 + /* "pygame/_sdl2/video.pyx":95 * cdef SDL_MessageBoxData data * data.flags = 0 * if warn: # <<<<<<<<<<<<<< @@ -3506,7 +3564,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5messagebox(CYTHON_UNUSED PyObje __pyx_t_1 = (__pyx_v_warn != 0); if (__pyx_t_1) { - /* "pygame/_sdl2/video.pyx":95 + /* "pygame/_sdl2/video.pyx":96 * data.flags = 0 * if warn: * data.flags |= _SDL_MESSAGEBOX_WARNING # <<<<<<<<<<<<<< @@ -3515,7 +3573,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5messagebox(CYTHON_UNUSED PyObje */ __pyx_v_data.flags = (__pyx_v_data.flags | SDL_MESSAGEBOX_WARNING); - /* "pygame/_sdl2/video.pyx":94 + /* "pygame/_sdl2/video.pyx":95 * cdef SDL_MessageBoxData data * data.flags = 0 * if warn: # <<<<<<<<<<<<<< @@ -3524,7 +3582,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5messagebox(CYTHON_UNUSED PyObje */ } - /* "pygame/_sdl2/video.pyx":96 + /* "pygame/_sdl2/video.pyx":97 * if warn: * data.flags |= _SDL_MESSAGEBOX_WARNING * if error: # <<<<<<<<<<<<<< @@ -3534,7 +3592,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5messagebox(CYTHON_UNUSED PyObje __pyx_t_1 = (__pyx_v_error != 0); if (__pyx_t_1) { - /* "pygame/_sdl2/video.pyx":97 + /* "pygame/_sdl2/video.pyx":98 * data.flags |= _SDL_MESSAGEBOX_WARNING * if error: * data.flags |= _SDL_MESSAGEBOX_ERROR # <<<<<<<<<<<<<< @@ -3543,7 +3601,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5messagebox(CYTHON_UNUSED PyObje */ __pyx_v_data.flags = (__pyx_v_data.flags | SDL_MESSAGEBOX_ERROR); - /* "pygame/_sdl2/video.pyx":96 + /* "pygame/_sdl2/video.pyx":97 * if warn: * data.flags |= _SDL_MESSAGEBOX_WARNING * if error: # <<<<<<<<<<<<<< @@ -3552,7 +3610,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5messagebox(CYTHON_UNUSED PyObje */ } - /* "pygame/_sdl2/video.pyx":98 + /* "pygame/_sdl2/video.pyx":99 * if error: * data.flags |= _SDL_MESSAGEBOX_ERROR * if info: # <<<<<<<<<<<<<< @@ -3562,7 +3620,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5messagebox(CYTHON_UNUSED PyObje __pyx_t_1 = (__pyx_v_info != 0); if (__pyx_t_1) { - /* "pygame/_sdl2/video.pyx":99 + /* "pygame/_sdl2/video.pyx":100 * data.flags |= _SDL_MESSAGEBOX_ERROR * if info: * data.flags |= _SDL_MESSAGEBOX_INFORMATION # <<<<<<<<<<<<<< @@ -3571,7 +3629,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5messagebox(CYTHON_UNUSED PyObje */ __pyx_v_data.flags = (__pyx_v_data.flags | SDL_MESSAGEBOX_INFORMATION); - /* "pygame/_sdl2/video.pyx":98 + /* "pygame/_sdl2/video.pyx":99 * if error: * data.flags |= _SDL_MESSAGEBOX_ERROR * if info: # <<<<<<<<<<<<<< @@ -3580,18 +3638,18 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5messagebox(CYTHON_UNUSED PyObje */ } - /* "pygame/_sdl2/video.pyx":100 + /* "pygame/_sdl2/video.pyx":101 * 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, 100, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_window)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 101, __pyx_L1_error) __pyx_t_2 = ((!__pyx_t_1) != 0); if (__pyx_t_2) { - /* "pygame/_sdl2/video.pyx":101 + /* "pygame/_sdl2/video.pyx":102 * data.flags |= _SDL_MESSAGEBOX_INFORMATION * if not window: * data.window = NULL # <<<<<<<<<<<<<< @@ -3600,7 +3658,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5messagebox(CYTHON_UNUSED PyObje */ __pyx_v_data.window = NULL; - /* "pygame/_sdl2/video.pyx":100 + /* "pygame/_sdl2/video.pyx":101 * if info: * data.flags |= _SDL_MESSAGEBOX_INFORMATION * if not window: # <<<<<<<<<<<<<< @@ -3610,7 +3668,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5messagebox(CYTHON_UNUSED PyObje goto __pyx_L6; } - /* "pygame/_sdl2/video.pyx":103 + /* "pygame/_sdl2/video.pyx":104 * data.window = NULL * else: * data.window = window._win # <<<<<<<<<<<<<< @@ -3623,7 +3681,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5messagebox(CYTHON_UNUSED PyObje } __pyx_L6:; - /* "pygame/_sdl2/video.pyx":104 + /* "pygame/_sdl2/video.pyx":105 * else: * data.window = window._win * if title is not None: # <<<<<<<<<<<<<< @@ -3634,14 +3692,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5messagebox(CYTHON_UNUSED PyObje __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "pygame/_sdl2/video.pyx":105 + /* "pygame/_sdl2/video.pyx":106 * 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, 105, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_title, __pyx_n_s_encode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -3655,23 +3713,23 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5messagebox(CYTHON_UNUSED PyObje } __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_n_s_utf8) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_n_s_utf8); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 105, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 106, __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":106 + /* "pygame/_sdl2/video.pyx":107 * if title is not None: * title = title.encode('utf8') * data.title = title # <<<<<<<<<<<<<< * else: * data.title = NULL */ - __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_title); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 106, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_title); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 107, __pyx_L1_error) __pyx_v_data.title = __pyx_t_7; - /* "pygame/_sdl2/video.pyx":104 + /* "pygame/_sdl2/video.pyx":105 * else: * data.window = window._win * if title is not None: # <<<<<<<<<<<<<< @@ -3681,7 +3739,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5messagebox(CYTHON_UNUSED PyObje goto __pyx_L7; } - /* "pygame/_sdl2/video.pyx":108 + /* "pygame/_sdl2/video.pyx":109 * data.title = title * else: * data.title = NULL # <<<<<<<<<<<<<< @@ -3693,14 +3751,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5messagebox(CYTHON_UNUSED PyObje } __pyx_L7:; - /* "pygame/_sdl2/video.pyx":109 + /* "pygame/_sdl2/video.pyx":110 * 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, 109, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_message, __pyx_n_s_encode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 110, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -3714,23 +3772,23 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5messagebox(CYTHON_UNUSED PyObje } __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_n_s_utf8) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_n_s_utf8); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 109, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 110, __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":110 + /* "pygame/_sdl2/video.pyx":111 * data.title = NULL * message = message.encode('utf8') * data.message = message # <<<<<<<<<<<<<< * data.colorScheme = NULL * */ - __pyx_t_8 = __Pyx_PyObject_AsString(__pyx_v_message); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(0, 110, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_AsString(__pyx_v_message); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(0, 111, __pyx_L1_error) __pyx_v_data.message = __pyx_t_8; - /* "pygame/_sdl2/video.pyx":111 + /* "pygame/_sdl2/video.pyx":112 * message = message.encode('utf8') * data.message = message * data.colorScheme = NULL # <<<<<<<<<<<<<< @@ -3739,18 +3797,18 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5messagebox(CYTHON_UNUSED PyObje */ __pyx_v_data.colorScheme = NULL; - /* "pygame/_sdl2/video.pyx":114 + /* "pygame/_sdl2/video.pyx":115 * * cdef SDL_MessageBoxButtonData button * if not buttons: # <<<<<<<<<<<<<< * button.flags = _SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT |\ * _SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_buttons); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 114, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_buttons); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 115, __pyx_L1_error) __pyx_t_2 = ((!__pyx_t_1) != 0); if (__pyx_t_2) { - /* "pygame/_sdl2/video.pyx":115 + /* "pygame/_sdl2/video.pyx":116 * cdef SDL_MessageBoxButtonData button * if not buttons: * button.flags = _SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT |\ # <<<<<<<<<<<<<< @@ -3759,7 +3817,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5messagebox(CYTHON_UNUSED PyObje */ __pyx_v_button.flags = (SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT | SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT); - /* "pygame/_sdl2/video.pyx":117 + /* "pygame/_sdl2/video.pyx":118 * button.flags = _SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT |\ * _SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT * button.buttonid = 0 # <<<<<<<<<<<<<< @@ -3768,7 +3826,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5messagebox(CYTHON_UNUSED PyObje */ __pyx_v_button.buttonid = 0; - /* "pygame/_sdl2/video.pyx":118 + /* "pygame/_sdl2/video.pyx":119 * _SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT * button.buttonid = 0 * button.text = "OK" # <<<<<<<<<<<<<< @@ -3777,7 +3835,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5messagebox(CYTHON_UNUSED PyObje */ __pyx_v_button.text = ((char const *)"OK"); - /* "pygame/_sdl2/video.pyx":119 + /* "pygame/_sdl2/video.pyx":120 * button.buttonid = 0 * button.text = "OK" * data.buttons = &button # <<<<<<<<<<<<<< @@ -3786,7 +3844,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5messagebox(CYTHON_UNUSED PyObje */ __pyx_v_data.buttons = (&__pyx_v_button); - /* "pygame/_sdl2/video.pyx":120 + /* "pygame/_sdl2/video.pyx":121 * button.text = "OK" * data.buttons = &button * data.numbuttons = 1 # <<<<<<<<<<<<<< @@ -3795,7 +3853,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5messagebox(CYTHON_UNUSED PyObje */ __pyx_v_data.numbuttons = 1; - /* "pygame/_sdl2/video.pyx":114 + /* "pygame/_sdl2/video.pyx":115 * * cdef SDL_MessageBoxButtonData button * if not buttons: # <<<<<<<<<<<<<< @@ -3805,7 +3863,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5messagebox(CYTHON_UNUSED PyObje goto __pyx_L8; } - /* "pygame/_sdl2/video.pyx":122 + /* "pygame/_sdl2/video.pyx":123 * data.numbuttons = 1 * else: * buttons_utf8 = [s.encode('utf8') for s in buttons] # <<<<<<<<<<<<<< @@ -3814,32 +3872,32 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5messagebox(CYTHON_UNUSED PyObje */ /*else*/ { { /* enter inner scope */ - __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 122, __pyx_L11_error) + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 123, __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_9 = 0; __pyx_t_10 = NULL; } else { - __pyx_t_9 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_buttons); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 122, __pyx_L11_error) + __pyx_t_9 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_buttons); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 123, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_10 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 122, __pyx_L11_error) + __pyx_t_10 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 123, __pyx_L11_error) } for (;;) { if (likely(!__pyx_t_10)) { if (likely(PyList_CheckExact(__pyx_t_5))) { if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_9); __Pyx_INCREF(__pyx_t_6); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 122, __pyx_L11_error) + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_9); __Pyx_INCREF(__pyx_t_6); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 123, __pyx_L11_error) #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_5, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 122, __pyx_L11_error) + __pyx_t_6 = PySequence_ITEM(__pyx_t_5, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 123, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_6); #endif } else { if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_9); __Pyx_INCREF(__pyx_t_6); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 122, __pyx_L11_error) + __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_9); __Pyx_INCREF(__pyx_t_6); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 123, __pyx_L11_error) #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_5, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 122, __pyx_L11_error) + __pyx_t_6 = PySequence_ITEM(__pyx_t_5, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 123, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_6); #endif } @@ -3849,7 +3907,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5messagebox(CYTHON_UNUSED PyObje PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 122, __pyx_L11_error) + else __PYX_ERR(0, 123, __pyx_L11_error) } break; } @@ -3857,7 +3915,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5messagebox(CYTHON_UNUSED PyObje } __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_s, __pyx_t_6); __pyx_t_6 = 0; - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_7genexpr__pyx_v_s, __pyx_n_s_encode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 122, __pyx_L11_error) + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_7genexpr__pyx_v_s, __pyx_n_s_encode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 123, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_12 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) { @@ -3871,10 +3929,10 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5messagebox(CYTHON_UNUSED PyObje } __pyx_t_6 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_12, __pyx_n_s_utf8) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_n_s_utf8); __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 122, __pyx_L11_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 123, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 122, __pyx_L11_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 123, __pyx_L11_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -3888,17 +3946,17 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5messagebox(CYTHON_UNUSED PyObje __pyx_v_buttons_utf8 = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; - /* "pygame/_sdl2/video.pyx":123 + /* "pygame/_sdl2/video.pyx":124 * else: * buttons_utf8 = [s.encode('utf8') for s in buttons] * data.numbuttons = len(buttons) # <<<<<<<<<<<<<< * c_buttons =\ * malloc(data.numbuttons * sizeof(SDL_MessageBoxButtonData)) */ - __pyx_t_9 = PyObject_Length(__pyx_v_buttons); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 123, __pyx_L1_error) + __pyx_t_9 = PyObject_Length(__pyx_v_buttons); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 124, __pyx_L1_error) __pyx_v_data.numbuttons = __pyx_t_9; - /* "pygame/_sdl2/video.pyx":125 + /* "pygame/_sdl2/video.pyx":126 * data.numbuttons = len(buttons) * c_buttons =\ * malloc(data.numbuttons * sizeof(SDL_MessageBoxButtonData)) # <<<<<<<<<<<<<< @@ -3907,7 +3965,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5messagebox(CYTHON_UNUSED PyObje */ __pyx_v_c_buttons = ((SDL_MessageBoxButtonData *)malloc((__pyx_v_data.numbuttons * (sizeof(SDL_MessageBoxButtonData))))); - /* "pygame/_sdl2/video.pyx":126 + /* "pygame/_sdl2/video.pyx":127 * c_buttons =\ * malloc(data.numbuttons * sizeof(SDL_MessageBoxButtonData)) * if not c_buttons: # <<<<<<<<<<<<<< @@ -3917,16 +3975,16 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5messagebox(CYTHON_UNUSED PyObje __pyx_t_2 = ((!(__pyx_v_c_buttons != 0)) != 0); if (unlikely(__pyx_t_2)) { - /* "pygame/_sdl2/video.pyx":127 + /* "pygame/_sdl2/video.pyx":128 * 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, 127, __pyx_L1_error) + PyErr_NoMemory(); __PYX_ERR(0, 128, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":126 + /* "pygame/_sdl2/video.pyx":127 * c_buttons =\ * malloc(data.numbuttons * sizeof(SDL_MessageBoxButtonData)) * if not c_buttons: # <<<<<<<<<<<<<< @@ -3935,7 +3993,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5messagebox(CYTHON_UNUSED PyObje */ } - /* "pygame/_sdl2/video.pyx":128 + /* "pygame/_sdl2/video.pyx":129 * if not c_buttons: * raise MemoryError() * for i, but in enumerate(reversed(buttons_utf8)): # <<<<<<<<<<<<<< @@ -3949,78 +4007,78 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5messagebox(CYTHON_UNUSED PyObje if (__pyx_t_9 < 0) break; if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_9); __Pyx_INCREF(__pyx_t_6); __pyx_t_9--; if (unlikely(0 < 0)) __PYX_ERR(0, 128, __pyx_L1_error) + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_9); __Pyx_INCREF(__pyx_t_6); __pyx_t_9--; if (unlikely(0 < 0)) __PYX_ERR(0, 129, __pyx_L1_error) #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_5, __pyx_t_9); __pyx_t_9--; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 128, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(__pyx_t_5, __pyx_t_9); __pyx_t_9--; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 129, __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, 128, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_t_4, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 129, __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":129 + /* "pygame/_sdl2/video.pyx":130 * 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_13 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_13 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 129, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_13 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 130, __pyx_L1_error) (__pyx_v_c_buttons[__pyx_t_13]).flags = 0; - /* "pygame/_sdl2/video.pyx":130 + /* "pygame/_sdl2/video.pyx":131 * 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, 130, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_data.numbuttons); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 131, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_11 = PyNumber_Subtract(__pyx_t_6, __pyx_v_i); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 130, __pyx_L1_error) + __pyx_t_11 = PyNumber_Subtract(__pyx_t_6, __pyx_v_i); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 131, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyInt_SubtractObjC(__pyx_t_11, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 130, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_SubtractObjC(__pyx_t_11, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 131, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_t_14 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_14 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 130, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_14 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 131, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_13 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_13 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 130, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_13 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 131, __pyx_L1_error) (__pyx_v_c_buttons[__pyx_t_13]).buttonid = __pyx_t_14; - /* "pygame/_sdl2/video.pyx":131 + /* "pygame/_sdl2/video.pyx":132 * 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_13 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_13 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 131, __pyx_L1_error) - __pyx_t_6 = __Pyx_PyInt_From_int((__pyx_v_c_buttons[__pyx_t_13]).buttonid); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 131, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_13 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_int((__pyx_v_c_buttons[__pyx_t_13]).buttonid); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 132, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_11 = PyObject_RichCompare(__pyx_t_6, __pyx_v_return_button, Py_EQ); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 131, __pyx_L1_error) + __pyx_t_11 = PyObject_RichCompare(__pyx_t_6, __pyx_v_return_button, Py_EQ); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 132, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 131, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 132, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (__pyx_t_2) { - /* "pygame/_sdl2/video.pyx":132 + /* "pygame/_sdl2/video.pyx":133 * 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_13 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_13 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_13 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 133, __pyx_L1_error) (__pyx_v_c_buttons[__pyx_t_13]).flags = ((__pyx_v_c_buttons[__pyx_t_13]).flags | SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT); - /* "pygame/_sdl2/video.pyx":131 + /* "pygame/_sdl2/video.pyx":132 * c_buttons[i].flags = 0 * c_buttons[i].buttonid = data.numbuttons - i - 1 * if c_buttons[i].buttonid == return_button: # <<<<<<<<<<<<<< @@ -4029,33 +4087,33 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5messagebox(CYTHON_UNUSED PyObje */ } - /* "pygame/_sdl2/video.pyx":133 + /* "pygame/_sdl2/video.pyx":134 * 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_13 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_13 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 133, __pyx_L1_error) - __pyx_t_11 = __Pyx_PyInt_From_int((__pyx_v_c_buttons[__pyx_t_13]).buttonid); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 133, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_13 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 134, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyInt_From_int((__pyx_v_c_buttons[__pyx_t_13]).buttonid); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_6 = PyObject_RichCompare(__pyx_t_11, __pyx_v_escape_button, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 133, __pyx_L1_error) + __pyx_t_6 = PyObject_RichCompare(__pyx_t_11, __pyx_v_escape_button, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 134, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 133, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 134, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_2) { - /* "pygame/_sdl2/video.pyx":134 + /* "pygame/_sdl2/video.pyx":135 * 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_13 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_13 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 134, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_13 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 135, __pyx_L1_error) (__pyx_v_c_buttons[__pyx_t_13]).flags = ((__pyx_v_c_buttons[__pyx_t_13]).flags | SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT); - /* "pygame/_sdl2/video.pyx":133 + /* "pygame/_sdl2/video.pyx":134 * if c_buttons[i].buttonid == return_button: * c_buttons[i].flags |= _SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT * if c_buttons[i].buttonid == escape_button: # <<<<<<<<<<<<<< @@ -4064,18 +4122,18 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5messagebox(CYTHON_UNUSED PyObje */ } - /* "pygame/_sdl2/video.pyx":135 + /* "pygame/_sdl2/video.pyx":136 * 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_15 = __Pyx_PyObject_AsString(__pyx_v_but); if (unlikely((!__pyx_t_15) && PyErr_Occurred())) __PYX_ERR(0, 135, __pyx_L1_error) - __pyx_t_13 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_13 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 135, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyObject_AsString(__pyx_v_but); if (unlikely((!__pyx_t_15) && PyErr_Occurred())) __PYX_ERR(0, 136, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_13 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 136, __pyx_L1_error) (__pyx_v_c_buttons[__pyx_t_13]).text = __pyx_t_15; - /* "pygame/_sdl2/video.pyx":128 + /* "pygame/_sdl2/video.pyx":129 * if not c_buttons: * raise MemoryError() * for i, but in enumerate(reversed(buttons_utf8)): # <<<<<<<<<<<<<< @@ -4086,7 +4144,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5messagebox(CYTHON_UNUSED PyObje __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "pygame/_sdl2/video.pyx":136 + /* "pygame/_sdl2/video.pyx":137 * c_buttons[i].flags |= _SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT * c_buttons[i].text = but * data.buttons = c_buttons # <<<<<<<<<<<<<< @@ -4097,7 +4155,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5messagebox(CYTHON_UNUSED PyObje } __pyx_L8:; - /* "pygame/_sdl2/video.pyx":139 + /* "pygame/_sdl2/video.pyx":140 * * cdef int buttonid * if SDL_ShowMessageBox(&data, &buttonid): # <<<<<<<<<<<<<< @@ -4107,7 +4165,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5messagebox(CYTHON_UNUSED PyObje __pyx_t_2 = (SDL_ShowMessageBox((&__pyx_v_data), (&__pyx_v_buttonid)) != 0); if (unlikely(__pyx_t_2)) { - /* "pygame/_sdl2/video.pyx":140 + /* "pygame/_sdl2/video.pyx":141 * cdef int buttonid * if SDL_ShowMessageBox(&data, &buttonid): * free(c_buttons) # <<<<<<<<<<<<<< @@ -4116,14 +4174,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5messagebox(CYTHON_UNUSED PyObje */ free(__pyx_v_c_buttons); - /* "pygame/_sdl2/video.pyx":141 + /* "pygame/_sdl2/video.pyx":142 * 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, 141, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_errorfnc); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 142, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { @@ -4137,14 +4195,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5messagebox(CYTHON_UNUSED PyObje } __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 141, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 142, __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, 141, __pyx_L1_error) + __PYX_ERR(0, 142, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":139 + /* "pygame/_sdl2/video.pyx":140 * * cdef int buttonid * if SDL_ShowMessageBox(&data, &buttonid): # <<<<<<<<<<<<<< @@ -4153,7 +4211,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5messagebox(CYTHON_UNUSED PyObje */ } - /* "pygame/_sdl2/video.pyx":143 + /* "pygame/_sdl2/video.pyx":144 * raise errorfnc() * * free(c_buttons) # <<<<<<<<<<<<<< @@ -4162,21 +4220,21 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5messagebox(CYTHON_UNUSED PyObje */ free(__pyx_v_c_buttons); - /* "pygame/_sdl2/video.pyx":144 + /* "pygame/_sdl2/video.pyx":145 * * free(c_buttons) * return buttonid # <<<<<<<<<<<<<< * - * + * globals()["Window"]=Window */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_buttonid); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 144, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_buttonid); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 145, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; - /* "pygame/_sdl2/video.pyx":66 + /* "pygame/_sdl2/video.pyx":67 * return None * * def messagebox(title, message, # <<<<<<<<<<<<<< @@ -4205,7 +4263,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5messagebox(CYTHON_UNUSED PyObje return __pyx_r; } -/* "pygame/_sdl2/video.pyx":172 +/* "pygame/_sdl2/video.pyx":174 * * @classmethod * def from_display_module(cls): # <<<<<<<<<<<<<< @@ -4214,21 +4272,21 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5messagebox(CYTHON_UNUSED PyObje */ /* Python wrapper */ -static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_1from_display_module(PyObject *__pyx_v_cls, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_6pygame_5_sdl2_5video_6Window_from_display_module[] = "Create a Window object using window data from display module\n\n Creates a Window object that uses the same window data from the :mod:`pygame.display` module, created upon calling\n :func:`pygame.display.set_mode`.\n "; -static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_1from_display_module(PyObject *__pyx_v_cls, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7_Window_1from_display_module(PyObject *__pyx_v_cls, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_6pygame_5_sdl2_5video_7_Window_from_display_module[] = "Create a Window object using window data from display module\n\n Creates a Window object that uses the same window data from the :mod:`pygame.display` module, created upon calling\n :func:`pygame.display.set_mode`.\n "; +static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7_Window_1from_display_module(PyObject *__pyx_v_cls, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("from_display_module (wrapper)", 0); - __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_6Window_from_display_module(((PyTypeObject*)__pyx_v_cls)); + __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_7_Window_from_display_module(((PyTypeObject*)__pyx_v_cls)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_from_display_module(PyTypeObject *__pyx_v_cls) { - struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self = 0; +static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7_Window_from_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 @@ -4241,34 +4299,34 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_from_display_module(PyTy int __pyx_clineno = 0; __Pyx_RefNannySetupContext("from_display_module", 0); - /* "pygame/_sdl2/video.pyx":178 + /* "pygame/_sdl2/video.pyx":180 * :func:`pygame.display.set_mode`. * """ - * cdef Window self = cls.__new__(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, 178, __pyx_L1_error) + __PYX_ERR(0, 180, __pyx_L1_error) } - __pyx_t_1 = __Pyx_tp_new(((PyObject *)__pyx_v_cls), __pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 178, __pyx_L1_error) + __pyx_t_1 = __Pyx_tp_new(((PyObject *)__pyx_v_cls), __pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 180, __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, 178, __pyx_L1_error) - __pyx_v_self = ((struct __pyx_obj_6pygame_5_sdl2_5video_Window *)__pyx_t_1); + if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6pygame_5_sdl2_5video__Window)))) __PYX_ERR(0, 180, __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":179 + /* "pygame/_sdl2/video.pyx":181 * """ - * cdef Window self = cls.__new__(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":180 - * cdef Window self = cls.__new__(cls) + /* "pygame/_sdl2/video.pyx":182 + * cdef _Window self = cls.__new__(cls) * cdef SDL_Window* window = pg_GetDefaultWindow() * if not window: # <<<<<<<<<<<<<< * raise error() @@ -4277,14 +4335,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_from_display_module(PyTy __pyx_t_2 = ((!(__pyx_v_window != 0)) != 0); if (unlikely(__pyx_t_2)) { - /* "pygame/_sdl2/video.pyx":181 + /* "pygame/_sdl2/video.pyx":183 * 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, 181, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 183, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { @@ -4298,15 +4356,15 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_from_display_module(PyTy } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 181, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 183, __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, 181, __pyx_L1_error) + __PYX_ERR(0, 183, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":180 - * cdef Window self = cls.__new__(cls) + /* "pygame/_sdl2/video.pyx":182 + * cdef _Window self = cls.__new__(cls) * cdef SDL_Window* window = pg_GetDefaultWindow() * if not window: # <<<<<<<<<<<<<< * raise error() @@ -4314,7 +4372,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_from_display_module(PyTy */ } - /* "pygame/_sdl2/video.pyx":182 + /* "pygame/_sdl2/video.pyx":184 * if not window: * raise error() * self._win=window # <<<<<<<<<<<<<< @@ -4323,7 +4381,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_from_display_module(PyTy */ __pyx_v_self->_win = __pyx_v_window; - /* "pygame/_sdl2/video.pyx":183 + /* "pygame/_sdl2/video.pyx":185 * raise error() * self._win=window * self._is_borrowed=1 # <<<<<<<<<<<<<< @@ -4332,7 +4390,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_from_display_module(PyTy */ __pyx_v_self->_is_borrowed = 1; - /* "pygame/_sdl2/video.pyx":184 + /* "pygame/_sdl2/video.pyx":186 * self._win=window * self._is_borrowed=1 * SDL_SetWindowData(window, "pg_window", self) # <<<<<<<<<<<<<< @@ -4341,7 +4399,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_from_display_module(PyTy */ (void)(SDL_SetWindowData(__pyx_v_window, ((char const *)"pg_window"), ((PyObject *)__pyx_v_self))); - /* "pygame/_sdl2/video.pyx":185 + /* "pygame/_sdl2/video.pyx":187 * self._is_borrowed=1 * SDL_SetWindowData(window, "pg_window", self) * return self # <<<<<<<<<<<<<< @@ -4353,7 +4411,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_from_display_module(PyTy __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "pygame/_sdl2/video.pyx":172 + /* "pygame/_sdl2/video.pyx":174 * * @classmethod * def from_display_module(cls): # <<<<<<<<<<<<<< @@ -4366,7 +4424,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_from_display_module(PyTy __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_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); @@ -4375,7 +4433,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_from_display_module(PyTy return __pyx_r; } -/* "pygame/_sdl2/video.pyx":187 +/* "pygame/_sdl2/video.pyx":189 * return self * * def __init__(self, title='pygame window', # <<<<<<<<<<<<<< @@ -4384,12 +4442,12 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_from_display_module(PyTy */ /* Python wrapper */ -static int __pyx_pw_6pygame_5_sdl2_5video_6Window_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_6pygame_5_sdl2_5video_6Window_2__init__[] = "pygame object that represents a window\n\n Creates a window.\n\n :param str title: The title of the window.\n :param (int, int) size: The size of the window, in screen coordinates.\n :param (int, int) or int position: A tuple specifying the window position, or\n ``WINDOWPOS_CENTERED``, or ``WINDOWPOS_UNDEFINED``.\n :param bool fullscreen: Create a fullscreen window using the window size as\n the resolution (videomode change).\n :param bool fullscreen_desktop: Create a fullscreen window using the current\n desktop resolution.\n :param bool opengl: Create a window with support for an OpenGL context. You\n will still need to create an OpenGL context separately.\n :param bool vulkan: Create a window with support for a Vulkan instance.\n :param bool hidden: Create a hidden window.\n :param bool borderless: Create a window without borders.\n :param bool resizable: Create a resizable window.\n :param bool minimized: Create a mimized window.\n :param bool maximized: Create a maximized window.\n :param bool input_grabbed: Create a window with a grabbed input focus.\n :param bool input_focus: Create a window with input focus.\n :param bool mouse_focus: Create a window with mouse focus.\n :param bool foreign: Marks a window not created by SDL.\n :param bool allow_highdpi: Create a window in high-DPI mode if supported\n (>= SDL 2.0.1).\n :param bool mouse_capture: Create a window that has the mouse captured\n (unrelated to INPUT_GRABBED, >= SDL 2.0.4).\n :param bool always_on_top: Create a window that is always on top\n (X11 only, >= SDL 2.0.5).\n :param bool skip_taskbar: Create a window that sho""uld not be added to the\n taskbar (X11 only, >= SDL 2.0.5).\n :param bool utility: Create a window that should be treated as a utility\n window (X11 only, >= SDL 2.0.5).\n :param bool tooltip: Create a window that should be treated as a tooltip\n (X11 only, >= SDL 2.0.5).\n :param bool popup_menu: Create a window that should be treated as a popup menu \n (X11 only, >= SDL 2.0.5).\n "; +static int __pyx_pw_6pygame_5_sdl2_5video_7_Window_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_6pygame_5_sdl2_5video_7_Window_2__init__[] = "pygame object that represents a window\n\n Creates a window.\n\n :param str title: The title of the window.\n :param (int, int) size: The size of the window, in screen coordinates.\n :param (int, int) or int position: A tuple specifying the window position, or\n ``WINDOWPOS_CENTERED``, or ``WINDOWPOS_UNDEFINED``.\n :param bool fullscreen: Create a fullscreen window using the window size as\n the resolution (videomode change).\n :param bool fullscreen_desktop: Create a fullscreen window using the current\n desktop resolution.\n :param bool opengl: Create a window with support for an OpenGL context. You\n will still need to create an OpenGL context separately.\n :param bool vulkan: Create a window with support for a Vulkan instance.\n :param bool hidden: Create a hidden window.\n :param bool borderless: Create a window without borders.\n :param bool resizable: Create a resizable window.\n :param bool minimized: Create a mimized window.\n :param bool maximized: Create a maximized window.\n :param bool input_grabbed: Create a window with a grabbed input focus.\n :param bool input_focus: Create a window with input focus.\n :param bool mouse_focus: Create a window with mouse focus.\n :param bool foreign: Marks a window not created by SDL.\n :param bool allow_highdpi: Create a window in high-DPI mode if supported\n (>= SDL 2.0.1).\n :param bool mouse_capture: Create a window that has the mouse captured\n (unrelated to INPUT_GRABBED, >= SDL 2.0.4).\n :param bool always_on_top: Create a window that is always on top\n (X11 only, >= SDL 2.0.5).\n :param bool skip_taskbar: Create a window that sho""uld not be added to the\n taskbar (X11 only, >= SDL 2.0.5).\n :param bool utility: Create a window that should be treated as a utility\n window (X11 only, >= SDL 2.0.5).\n :param bool tooltip: Create a window that should be treated as a tooltip\n (X11 only, >= SDL 2.0.5).\n :param bool popup_menu: Create a window that should be treated as a popup menu \n (X11 only, >= SDL 2.0.5).\n "; #if CYTHON_UPDATE_DESCRIPTOR_DOC -struct wrapperbase __pyx_wrapperbase_6pygame_5_sdl2_5video_6Window_2__init__; +struct wrapperbase __pyx_wrapperbase_6pygame_5_sdl2_5video_7_Window_2__init__; #endif -static int __pyx_pw_6pygame_5_sdl2_5video_6Window_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static int __pyx_pw_6pygame_5_sdl2_5video_7_Window_3__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; @@ -4460,7 +4518,7 @@ static int __pyx_pw_6pygame_5_sdl2_5video_6Window_3__init__(PyObject *__pyx_v_se } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 187, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 189, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -4482,10 +4540,10 @@ static int __pyx_pw_6pygame_5_sdl2_5video_6Window_3__init__(PyObject *__pyx_v_se __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, 190, __pyx_L3_error) + __pyx_v_fullscreen = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_fullscreen == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 192, __pyx_L3_error) } else { - /* "pygame/_sdl2/video.pyx":190 + /* "pygame/_sdl2/video.pyx":192 * size=DEFAULT_SIZE, * position=WINDOWPOS_UNDEFINED, * bint fullscreen=False, # <<<<<<<<<<<<<< @@ -4495,10 +4553,10 @@ static int __pyx_pw_6pygame_5_sdl2_5video_6Window_3__init__(PyObject *__pyx_v_se __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, 191, __pyx_L3_error) + __pyx_v_fullscreen_desktop = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_fullscreen_desktop == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 193, __pyx_L3_error) } else { - /* "pygame/_sdl2/video.pyx":191 + /* "pygame/_sdl2/video.pyx":193 * position=WINDOWPOS_UNDEFINED, * bint fullscreen=False, * bint fullscreen_desktop=False, **kwargs): # <<<<<<<<<<<<<< @@ -4510,16 +4568,16 @@ static int __pyx_pw_6pygame_5_sdl2_5video_6Window_3__init__(PyObject *__pyx_v_se } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 187, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 189, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; - __Pyx_AddTraceback("pygame._sdl2.video.Window.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __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_2__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); + __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_7_Window_2__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":187 + /* "pygame/_sdl2/video.pyx":189 * return self * * def __init__(self, title='pygame window', # <<<<<<<<<<<<<< @@ -4533,7 +4591,7 @@ static int __pyx_pw_6pygame_5_sdl2_5video_6Window_3__init__(PyObject *__pyx_v_se return __pyx_r; } -static int __pyx_pf_6pygame_5_sdl2_5video_6Window_2__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) { +static int __pyx_pf_6pygame_5_sdl2_5video_7_Window_2__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; @@ -4570,38 +4628,38 @@ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_2__init__(struct __pyx_obj_6py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "pygame/_sdl2/video.pyx":233 + /* "pygame/_sdl2/video.pyx":235 * # 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, 233, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_WINDOWPOS_UNDEFINED); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 235, __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, 233, __pyx_L1_error) + __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, 235, __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, 233, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 235, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { - /* "pygame/_sdl2/video.pyx":234 + /* "pygame/_sdl2/video.pyx":236 * # 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, 234, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_WINDOWPOS_UNDEFINED); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 236, __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, 234, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_WINDOWPOS_UNDEFINED); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 236, __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":233 + /* "pygame/_sdl2/video.pyx":235 * # https://wiki.libsdl.org/SDL_CreateWindow * # https://wiki.libsdl.org/SDL_WindowFlags * if position == WINDOWPOS_UNDEFINED: # <<<<<<<<<<<<<< @@ -4611,38 +4669,38 @@ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_2__init__(struct __pyx_obj_6py goto __pyx_L3; } - /* "pygame/_sdl2/video.pyx":235 + /* "pygame/_sdl2/video.pyx":237 * 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, 235, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_WINDOWPOS_CENTERED); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 237, __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, 235, __pyx_L1_error) + __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, 237, __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, 235, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 237, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { - /* "pygame/_sdl2/video.pyx":236 + /* "pygame/_sdl2/video.pyx":238 * 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, 236, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_WINDOWPOS_CENTERED); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 238, __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, 236, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_WINDOWPOS_CENTERED); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 238, __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":235 + /* "pygame/_sdl2/video.pyx":237 * if position == WINDOWPOS_UNDEFINED: * x, y = WINDOWPOS_UNDEFINED, WINDOWPOS_UNDEFINED * elif position == WINDOWPOS_CENTERED: # <<<<<<<<<<<<<< @@ -4652,7 +4710,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_2__init__(struct __pyx_obj_6py goto __pyx_L3; } - /* "pygame/_sdl2/video.pyx":238 + /* "pygame/_sdl2/video.pyx":240 * x, y = WINDOWPOS_CENTERED, WINDOWPOS_CENTERED * else: * x, y = position # <<<<<<<<<<<<<< @@ -4666,7 +4724,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_2__init__(struct __pyx_obj_6py if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 238, __pyx_L1_error) + __PYX_ERR(0, 240, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -4679,21 +4737,21 @@ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_2__init__(struct __pyx_obj_6py __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, 238, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 240, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 238, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 240, __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, 238, __pyx_L1_error) + __pyx_t_4 = PyObject_GetIter(__pyx_v_position); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 240, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; 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, 238, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) __PYX_ERR(0, 240, __pyx_L1_error) __pyx_t_5 = NULL; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L5_unpacking_done; @@ -4701,7 +4759,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_2__init__(struct __pyx_obj_6py __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 238, __pyx_L1_error) + __PYX_ERR(0, 240, __pyx_L1_error) __pyx_L5_unpacking_done:; } __pyx_v_x = __pyx_t_1; @@ -4711,7 +4769,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_2__init__(struct __pyx_obj_6py } __pyx_L3:; - /* "pygame/_sdl2/video.pyx":240 + /* "pygame/_sdl2/video.pyx":242 * x, y = position * * flags = 0 # <<<<<<<<<<<<<< @@ -4721,7 +4779,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_2__init__(struct __pyx_obj_6py __Pyx_INCREF(__pyx_int_0); __pyx_v_flags = __pyx_int_0; - /* "pygame/_sdl2/video.pyx":241 + /* "pygame/_sdl2/video.pyx":243 * * flags = 0 * if fullscreen and fullscreen_desktop: # <<<<<<<<<<<<<< @@ -4739,20 +4797,20 @@ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_2__init__(struct __pyx_obj_6py __pyx_L7_bool_binop_done:; if (unlikely(__pyx_t_3)) { - /* "pygame/_sdl2/video.pyx":242 + /* "pygame/_sdl2/video.pyx":244 * 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, 242, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 244, __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, 242, __pyx_L1_error) + __PYX_ERR(0, 244, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":241 + /* "pygame/_sdl2/video.pyx":243 * * flags = 0 * if fullscreen and fullscreen_desktop: # <<<<<<<<<<<<<< @@ -4761,7 +4819,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_2__init__(struct __pyx_obj_6py */ } - /* "pygame/_sdl2/video.pyx":243 + /* "pygame/_sdl2/video.pyx":245 * if fullscreen and fullscreen_desktop: * raise ValueError("fullscreen and fullscreen_desktop cannot be used at the same time.") * if fullscreen: # <<<<<<<<<<<<<< @@ -4771,22 +4829,22 @@ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_2__init__(struct __pyx_obj_6py __pyx_t_3 = (__pyx_v_fullscreen != 0); if (__pyx_t_3) { - /* "pygame/_sdl2/video.pyx":244 + /* "pygame/_sdl2/video.pyx":246 * 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, 244, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_Uint32(SDL_WINDOW_FULLSCREEN); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 246, __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, 244, __pyx_L1_error) + __pyx_t_1 = PyNumber_InPlaceOr(__pyx_v_flags, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 246, __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":243 + /* "pygame/_sdl2/video.pyx":245 * if fullscreen and fullscreen_desktop: * raise ValueError("fullscreen and fullscreen_desktop cannot be used at the same time.") * if fullscreen: # <<<<<<<<<<<<<< @@ -4796,7 +4854,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_2__init__(struct __pyx_obj_6py goto __pyx_L9; } - /* "pygame/_sdl2/video.pyx":245 + /* "pygame/_sdl2/video.pyx":247 * if fullscreen: * flags |= _SDL_WINDOW_FULLSCREEN * elif fullscreen_desktop: # <<<<<<<<<<<<<< @@ -4806,22 +4864,22 @@ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_2__init__(struct __pyx_obj_6py __pyx_t_3 = (__pyx_v_fullscreen_desktop != 0); if (__pyx_t_3) { - /* "pygame/_sdl2/video.pyx":246 + /* "pygame/_sdl2/video.pyx":248 * 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, 246, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_Uint32(SDL_WINDOW_FULLSCREEN_DESKTOP); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 248, __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, 246, __pyx_L1_error) + __pyx_t_2 = PyNumber_InPlaceOr(__pyx_v_flags, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 248, __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":245 + /* "pygame/_sdl2/video.pyx":247 * if fullscreen: * flags |= _SDL_WINDOW_FULLSCREEN * elif fullscreen_desktop: # <<<<<<<<<<<<<< @@ -4831,19 +4889,19 @@ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_2__init__(struct __pyx_obj_6py } __pyx_L9:; - /* "pygame/_sdl2/video.pyx":248 + /* "pygame/_sdl2/video.pyx":250 * 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, 248, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_kwarg_to_flag); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 250, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v__kwarg_to_flag = __pyx_t_2; __pyx_t_2 = 0; - /* "pygame/_sdl2/video.pyx":249 + /* "pygame/_sdl2/video.pyx":251 * * _kwarg_to_flag = self._kwarg_to_flag * for k, v in kwargs.items(): # <<<<<<<<<<<<<< @@ -4851,7 +4909,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_2__init__(struct __pyx_obj_6py * flag = _kwarg_to_flag[k] */ __pyx_t_7 = 0; - __pyx_t_1 = __Pyx_dict_iterator(__pyx_v_kwargs, 1, __pyx_n_s_items, (&__pyx_t_8), (&__pyx_t_9)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 249, __pyx_L1_error) + __pyx_t_1 = __Pyx_dict_iterator(__pyx_v_kwargs, 1, __pyx_n_s_items, (&__pyx_t_8), (&__pyx_t_9)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 251, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = __pyx_t_1; @@ -4859,7 +4917,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_2__init__(struct __pyx_obj_6py while (1) { __pyx_t_10 = __Pyx_dict_iter_next(__pyx_t_2, __pyx_t_8, &__pyx_t_7, &__pyx_t_1, &__pyx_t_4, NULL, __pyx_t_9); if (unlikely(__pyx_t_10 == 0)) break; - if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 249, __pyx_L1_error) + if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 251, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_1); @@ -4867,7 +4925,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_2__init__(struct __pyx_obj_6py __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_4); __pyx_t_4 = 0; - /* "pygame/_sdl2/video.pyx":250 + /* "pygame/_sdl2/video.pyx":252 * _kwarg_to_flag = self._kwarg_to_flag * for k, v in kwargs.items(): * try: # <<<<<<<<<<<<<< @@ -4883,41 +4941,41 @@ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_2__init__(struct __pyx_obj_6py __Pyx_XGOTREF(__pyx_t_13); /*try:*/ { - /* "pygame/_sdl2/video.pyx":251 + /* "pygame/_sdl2/video.pyx":253 * 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, 251, __pyx_L12_error) + __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v__kwarg_to_flag, __pyx_v_k); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 253, __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":252 + /* "pygame/_sdl2/video.pyx":254 * 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, 252, __pyx_L12_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_v); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 254, __pyx_L12_error) if (__pyx_t_3) { - /* "pygame/_sdl2/video.pyx":253 + /* "pygame/_sdl2/video.pyx":255 * 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, 253, __pyx_L12_error) + __pyx_t_4 = PyNumber_InPlaceOr(__pyx_v_flags, __pyx_v_flag); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 255, __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":252 + /* "pygame/_sdl2/video.pyx":254 * try: * flag = _kwarg_to_flag[k] * if v: # <<<<<<<<<<<<<< @@ -4926,7 +4984,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_2__init__(struct __pyx_obj_6py */ } - /* "pygame/_sdl2/video.pyx":250 + /* "pygame/_sdl2/video.pyx":252 * _kwarg_to_flag = self._kwarg_to_flag * for k, v in kwargs.items(): * try: # <<<<<<<<<<<<<< @@ -4942,7 +5000,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_2__init__(struct __pyx_obj_6py __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "pygame/_sdl2/video.pyx":254 + /* "pygame/_sdl2/video.pyx":256 * if v: * flags |= flag * except KeyError: # <<<<<<<<<<<<<< @@ -4951,32 +5009,32 @@ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_2__init__(struct __pyx_obj_6py */ __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError); if (__pyx_t_10) { - __Pyx_AddTraceback("pygame._sdl2.video.Window.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_1, &__pyx_t_14) < 0) __PYX_ERR(0, 254, __pyx_L14_except_error) + __Pyx_AddTraceback("pygame._sdl2.video._Window.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_1, &__pyx_t_14) < 0) __PYX_ERR(0, 256, __pyx_L14_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_14); - /* "pygame/_sdl2/video.pyx":255 + /* "pygame/_sdl2/video.pyx":257 * flags |= flag * except KeyError: * raise TypeError("unknown parameter: %s" % k) # <<<<<<<<<<<<<< * * self._win = SDL_CreateWindow(title.encode('utf8'), x, y, */ - __pyx_t_15 = __Pyx_PyString_FormatSafe(__pyx_kp_s_unknown_parameter_s, __pyx_v_k); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 255, __pyx_L14_except_error) + __pyx_t_15 = __Pyx_PyString_FormatSafe(__pyx_kp_s_unknown_parameter_s, __pyx_v_k); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 257, __pyx_L14_except_error) __Pyx_GOTREF(__pyx_t_15); - __pyx_t_16 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 255, __pyx_L14_except_error) + __pyx_t_16 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 257, __pyx_L14_except_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_Raise(__pyx_t_16, 0, 0, 0); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; - __PYX_ERR(0, 255, __pyx_L14_except_error) + __PYX_ERR(0, 257, __pyx_L14_except_error) } goto __pyx_L14_except_error; __pyx_L14_except_error:; - /* "pygame/_sdl2/video.pyx":250 + /* "pygame/_sdl2/video.pyx":252 * _kwarg_to_flag = self._kwarg_to_flag * for k, v in kwargs.items(): * try: # <<<<<<<<<<<<<< @@ -4993,14 +5051,14 @@ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_2__init__(struct __pyx_obj_6py } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sdl2/video.pyx":257 + /* "pygame/_sdl2/video.pyx":259 * 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_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_title, __pyx_n_s_encode); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 257, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_title, __pyx_n_s_encode); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 259, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_14))) { @@ -5014,31 +5072,31 @@ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_2__init__(struct __pyx_obj_6py } __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_14, __pyx_t_1, __pyx_n_s_utf8) : __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_n_s_utf8); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 257, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 259, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - __pyx_t_17 = __Pyx_PyObject_AsString(__pyx_t_2); if (unlikely((!__pyx_t_17) && PyErr_Occurred())) __PYX_ERR(0, 257, __pyx_L1_error) - __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_x); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 257, __pyx_L1_error) - __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_y); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 257, __pyx_L1_error) + __pyx_t_17 = __Pyx_PyObject_AsString(__pyx_t_2); if (unlikely((!__pyx_t_17) && PyErr_Occurred())) __PYX_ERR(0, 259, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_x); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 259, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_y); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 259, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":258 + /* "pygame/_sdl2/video.pyx":260 * * self._win = SDL_CreateWindow(title.encode('utf8'), x, y, * size[0], size[1], flags) # <<<<<<<<<<<<<< * self._is_borrowed=0 * if not self._win: */ - __pyx_t_14 = __Pyx_GetItemInt(__pyx_v_size, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 258, __pyx_L1_error) + __pyx_t_14 = __Pyx_GetItemInt(__pyx_v_size, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 260, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); - __pyx_t_18 = __Pyx_PyInt_As_int(__pyx_t_14); if (unlikely((__pyx_t_18 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 258, __pyx_L1_error) + __pyx_t_18 = __Pyx_PyInt_As_int(__pyx_t_14); if (unlikely((__pyx_t_18 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 260, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - __pyx_t_14 = __Pyx_GetItemInt(__pyx_v_size, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 258, __pyx_L1_error) + __pyx_t_14 = __Pyx_GetItemInt(__pyx_v_size, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 260, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); - __pyx_t_19 = __Pyx_PyInt_As_int(__pyx_t_14); if (unlikely((__pyx_t_19 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 258, __pyx_L1_error) + __pyx_t_19 = __Pyx_PyInt_As_int(__pyx_t_14); if (unlikely((__pyx_t_19 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 260, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - __pyx_t_20 = __Pyx_PyInt_As_Uint32(__pyx_v_flags); if (unlikely((__pyx_t_20 == ((Uint32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 258, __pyx_L1_error) + __pyx_t_20 = __Pyx_PyInt_As_Uint32(__pyx_v_flags); if (unlikely((__pyx_t_20 == ((Uint32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 260, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":257 + /* "pygame/_sdl2/video.pyx":259 * raise TypeError("unknown parameter: %s" % k) * * self._win = SDL_CreateWindow(title.encode('utf8'), x, y, # <<<<<<<<<<<<<< @@ -5048,7 +5106,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_2__init__(struct __pyx_obj_6py __pyx_v_self->_win = SDL_CreateWindow(__pyx_t_17, __pyx_t_9, __pyx_t_10, __pyx_t_18, __pyx_t_19, __pyx_t_20); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sdl2/video.pyx":259 + /* "pygame/_sdl2/video.pyx":261 * self._win = SDL_CreateWindow(title.encode('utf8'), x, y, * size[0], size[1], flags) * self._is_borrowed=0 # <<<<<<<<<<<<<< @@ -5057,7 +5115,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_2__init__(struct __pyx_obj_6py */ __pyx_v_self->_is_borrowed = 0; - /* "pygame/_sdl2/video.pyx":260 + /* "pygame/_sdl2/video.pyx":262 * size[0], size[1], flags) * self._is_borrowed=0 * if not self._win: # <<<<<<<<<<<<<< @@ -5067,14 +5125,14 @@ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_2__init__(struct __pyx_obj_6py __pyx_t_3 = ((!(__pyx_v_self->_win != 0)) != 0); if (unlikely(__pyx_t_3)) { - /* "pygame/_sdl2/video.pyx":261 + /* "pygame/_sdl2/video.pyx":263 * self._is_borrowed=0 * if not self._win: * raise error() # <<<<<<<<<<<<<< * SDL_SetWindowData(self._win, "pg_window", self) * */ - __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_error); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 261, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_error); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_14))) { @@ -5088,14 +5146,14 @@ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_2__init__(struct __pyx_obj_6py } __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_14); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 261, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 261, __pyx_L1_error) + __PYX_ERR(0, 263, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":260 + /* "pygame/_sdl2/video.pyx":262 * size[0], size[1], flags) * self._is_borrowed=0 * if not self._win: # <<<<<<<<<<<<<< @@ -5104,7 +5162,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_2__init__(struct __pyx_obj_6py */ } - /* "pygame/_sdl2/video.pyx":262 + /* "pygame/_sdl2/video.pyx":264 * if not self._win: * raise error() * SDL_SetWindowData(self._win, "pg_window", self) # <<<<<<<<<<<<<< @@ -5113,33 +5171,33 @@ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_2__init__(struct __pyx_obj_6py */ (void)(SDL_SetWindowData(__pyx_v_self->_win, ((char const *)"pg_window"), ((PyObject *)__pyx_v_self))); - /* "pygame/_sdl2/video.pyx":264 + /* "pygame/_sdl2/video.pyx":266 * 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, 264, __pyx_L1_error) + __pyx_t_2 = __Pyx_Import(__pyx_n_s_pygame_pkgdata, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 266, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_pygame = __pyx_t_2; __pyx_t_2 = 0; - /* "pygame/_sdl2/video.pyx":265 + /* "pygame/_sdl2/video.pyx":267 * * import pygame.pkgdata * surf = pygame.image.load(pygame.pkgdata.getResource( # <<<<<<<<<<<<<< * 'pygame_icon.bmp')) * surf.set_colorkey(0) */ - __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_pygame, __pyx_n_s_image); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 265, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_pygame, __pyx_n_s_image); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 267, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_load); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 265, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_load); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 267, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_pygame, __pyx_n_s_pkgdata); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 265, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_pygame, __pyx_n_s_pkgdata); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 267, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_getResource); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 265, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_getResource); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 267, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -5154,7 +5212,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_2__init__(struct __pyx_obj_6py } __pyx_t_14 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_16, __pyx_t_4, __pyx_kp_s_pygame_icon_bmp) : __Pyx_PyObject_CallOneArg(__pyx_t_16, __pyx_kp_s_pygame_icon_bmp); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 265, __pyx_L1_error) + if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 267, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_t_16 = NULL; @@ -5170,20 +5228,20 @@ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_2__init__(struct __pyx_obj_6py __pyx_t_2 = (__pyx_t_16) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_16, __pyx_t_14) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_14); __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 265, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 267, __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":267 + /* "pygame/_sdl2/video.pyx":269 * 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, 267, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_surf, __pyx_n_s_set_colorkey); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 269, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_14 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { @@ -5197,19 +5255,19 @@ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_2__init__(struct __pyx_obj_6py } __pyx_t_2 = (__pyx_t_14) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_14, __pyx_int_0) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_int_0); __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 267, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 269, __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":268 + /* "pygame/_sdl2/video.pyx":270 * '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, 268, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_icon); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_14 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { @@ -5223,12 +5281,12 @@ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_2__init__(struct __pyx_obj_6py } __pyx_t_2 = (__pyx_t_14) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_14, __pyx_v_surf) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_surf); __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 268, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 270, __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":187 + /* "pygame/_sdl2/video.pyx":189 * return self * * def __init__(self, title='pygame window', # <<<<<<<<<<<<<< @@ -5246,7 +5304,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_2__init__(struct __pyx_obj_6py __Pyx_XDECREF(__pyx_t_14); __Pyx_XDECREF(__pyx_t_15); __Pyx_XDECREF(__pyx_t_16); - __Pyx_AddTraceback("pygame._sdl2.video.Window.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("pygame._sdl2.video._Window.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_x); @@ -5262,7 +5320,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_2__init__(struct __pyx_obj_6py return __pyx_r; } -/* "pygame/_sdl2/video.pyx":271 +/* "pygame/_sdl2/video.pyx":273 * * @property * def grab(self): # <<<<<<<<<<<<<< @@ -5271,19 +5329,19 @@ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_2__init__(struct __pyx_obj_6py */ /* 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) { +static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7_Window_4grab_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7_Window_4grab_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_6Window_4grab___get__(((struct __pyx_obj_6pygame_5_sdl2_5video_Window *)__pyx_v_self)); + __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_7_Window_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) { +static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7_Window_4grab___get__(struct __pyx_obj_6pygame_5_sdl2_5video__Window *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -5292,7 +5350,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_4grab___get__(struct __p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "pygame/_sdl2/video.pyx":279 + /* "pygame/_sdl2/video.pyx":281 * the other window loses its grab in favor of the caller's window. * """ * return SDL_GetWindowGrab(self._win) != 0 # <<<<<<<<<<<<<< @@ -5300,13 +5358,13 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_4grab___get__(struct __p * @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, 279, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong((SDL_GetWindowGrab(__pyx_v_self->_win) != 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 281, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "pygame/_sdl2/video.pyx":271 + /* "pygame/_sdl2/video.pyx":273 * * @property * def grab(self): # <<<<<<<<<<<<<< @@ -5317,7 +5375,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_4grab___get__(struct __p /* 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_AddTraceback("pygame._sdl2.video._Window.grab.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -5325,7 +5383,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_4grab___get__(struct __p return __pyx_r; } -/* "pygame/_sdl2/video.pyx":282 +/* "pygame/_sdl2/video.pyx":284 * * @grab.setter * def grab(self, bint grabbed): # <<<<<<<<<<<<<< @@ -5334,8 +5392,8 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_4grab___get__(struct __p */ /* 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) { +static int __pyx_pw_6pygame_5_sdl2_5video_7_Window_4grab_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_grabbed); /*proto*/ +static int __pyx_pw_6pygame_5_sdl2_5video_7_Window_4grab_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_grabbed) { int __pyx_v_grabbed; int __pyx_lineno = 0; const char *__pyx_filename = NULL; @@ -5344,28 +5402,28 @@ static int __pyx_pw_6pygame_5_sdl2_5video_6Window_4grab_3__set__(PyObject *__pyx __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); 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, 282, __pyx_L3_error) + __pyx_v_grabbed = __Pyx_PyObject_IsTrue(__pyx_arg_grabbed); if (unlikely((__pyx_v_grabbed == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 284, __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_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)); + __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_7_Window_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) { +static int __pyx_pf_6pygame_5_sdl2_5video_7_Window_4grab_2__set__(struct __pyx_obj_6pygame_5_sdl2_5video__Window *__pyx_v_self, int __pyx_v_grabbed) { int __pyx_r; __Pyx_RefNannyDeclarations SDL_bool __pyx_t_1; __Pyx_RefNannySetupContext("__set__", 0); - /* "pygame/_sdl2/video.pyx":284 + /* "pygame/_sdl2/video.pyx":286 * def grab(self, bint grabbed): * # https://wiki.libsdl.org/SDL_SetWindowGrab * SDL_SetWindowGrab(self._win, 1 if grabbed else 0) # <<<<<<<<<<<<<< @@ -5379,7 +5437,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_4grab_2__set__(struct __pyx_ob } SDL_SetWindowGrab(__pyx_v_self->_win, __pyx_t_1); - /* "pygame/_sdl2/video.pyx":282 + /* "pygame/_sdl2/video.pyx":284 * * @grab.setter * def grab(self, bint grabbed): # <<<<<<<<<<<<<< @@ -5393,7 +5451,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_4grab_2__set__(struct __pyx_ob return __pyx_r; } -/* "pygame/_sdl2/video.pyx":287 +/* "pygame/_sdl2/video.pyx":289 * * @property * def relative_mouse(self): # <<<<<<<<<<<<<< @@ -5402,19 +5460,19 @@ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_4grab_2__set__(struct __pyx_ob */ /* 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) { +static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7_Window_14relative_mouse_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7_Window_14relative_mouse_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_6Window_14relative_mouse___get__(((struct __pyx_obj_6pygame_5_sdl2_5video_Window *)__pyx_v_self)); + __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_7_Window_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) { +static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7_Window_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; @@ -5423,7 +5481,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_14relative_mouse___get__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "pygame/_sdl2/video.pyx":301 + /* "pygame/_sdl2/video.pyx":303 * ``True`` will exit relative mouse mode. * """ * return SDL_GetRelativeMouseMode() # <<<<<<<<<<<<<< @@ -5431,13 +5489,13 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_14relative_mouse___get__ * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_SDL_bool(SDL_GetRelativeMouseMode()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 301, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_SDL_bool(SDL_GetRelativeMouseMode()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "pygame/_sdl2/video.pyx":287 + /* "pygame/_sdl2/video.pyx":289 * * @property * def relative_mouse(self): # <<<<<<<<<<<<<< @@ -5448,7 +5506,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_14relative_mouse___get__ /* 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_AddTraceback("pygame._sdl2.video._Window.relative_mouse.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -5456,7 +5514,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_14relative_mouse___get__ return __pyx_r; } -/* "pygame/_sdl2/video.pyx":305 +/* "pygame/_sdl2/video.pyx":307 * * @relative_mouse.setter * def relative_mouse(self, bint enable): # <<<<<<<<<<<<<< @@ -5465,8 +5523,8 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_14relative_mouse___get__ */ /* 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) { +static int __pyx_pw_6pygame_5_sdl2_5video_7_Window_14relative_mouse_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_enable); /*proto*/ +static int __pyx_pw_6pygame_5_sdl2_5video_7_Window_14relative_mouse_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_enable) { int __pyx_v_enable; int __pyx_lineno = 0; const char *__pyx_filename = NULL; @@ -5475,28 +5533,28 @@ static int __pyx_pw_6pygame_5_sdl2_5video_6Window_14relative_mouse_3__set__(PyOb __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); 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, 305, __pyx_L3_error) + __pyx_v_enable = __Pyx_PyObject_IsTrue(__pyx_arg_enable); if (unlikely((__pyx_v_enable == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 307, __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_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)); + __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_7_Window_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) { +static int __pyx_pf_6pygame_5_sdl2_5video_7_Window_14relative_mouse_2__set__(CYTHON_UNUSED struct __pyx_obj_6pygame_5_sdl2_5video__Window *__pyx_v_self, int __pyx_v_enable) { int __pyx_r; __Pyx_RefNannyDeclarations SDL_bool __pyx_t_1; __Pyx_RefNannySetupContext("__set__", 0); - /* "pygame/_sdl2/video.pyx":308 + /* "pygame/_sdl2/video.pyx":310 * # https://wiki.libsdl.org/SDL_SetRelativeMouseMode * #SDL_SetWindowGrab(self._win, 1 if enable else 0) * SDL_SetRelativeMouseMode(1 if enable else 0) # <<<<<<<<<<<<<< @@ -5510,7 +5568,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_14relative_mouse_2__set__(CYTH } (void)(SDL_SetRelativeMouseMode(__pyx_t_1)); - /* "pygame/_sdl2/video.pyx":305 + /* "pygame/_sdl2/video.pyx":307 * * @relative_mouse.setter * def relative_mouse(self, bint enable): # <<<<<<<<<<<<<< @@ -5524,7 +5582,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_14relative_mouse_2__set__(CYTH return __pyx_r; } -/* "pygame/_sdl2/video.pyx":310 +/* "pygame/_sdl2/video.pyx":312 * SDL_SetRelativeMouseMode(1 if enable else 0) * * def set_windowed(self): # <<<<<<<<<<<<<< @@ -5533,20 +5591,20 @@ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_14relative_mouse_2__set__(CYTH */ /* Python wrapper */ -static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_5set_windowed(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_6pygame_5_sdl2_5video_6Window_4set_windowed[] = "Enable windowed mode (exit fullscreen)\n\n .. seealso:: :func:`set_fullscreen`\n "; -static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_5set_windowed(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7_Window_5set_windowed(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_6pygame_5_sdl2_5video_7_Window_4set_windowed[] = "Enable windowed mode (exit fullscreen)\n\n .. seealso:: :func:`set_fullscreen`\n "; +static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7_Window_5set_windowed(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_windowed (wrapper)", 0); - __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_6Window_4set_windowed(((struct __pyx_obj_6pygame_5_sdl2_5video_Window *)__pyx_v_self)); + __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_7_Window_4set_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_4set_windowed(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self) { +static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7_Window_4set_windowed(struct __pyx_obj_6pygame_5_sdl2_5video__Window *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; @@ -5558,7 +5616,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_4set_windowed(struct __p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_windowed", 0); - /* "pygame/_sdl2/video.pyx":316 + /* "pygame/_sdl2/video.pyx":318 * """ * # https://wiki.libsdl.org/SDL_SetWindowFullscreen * if SDL_SetWindowFullscreen(self._win, 0): # <<<<<<<<<<<<<< @@ -5568,14 +5626,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_4set_windowed(struct __p __pyx_t_1 = (SDL_SetWindowFullscreen(__pyx_v_self->_win, 0) != 0); if (unlikely(__pyx_t_1)) { - /* "pygame/_sdl2/video.pyx":317 + /* "pygame/_sdl2/video.pyx":319 * # 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, 317, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 319, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { @@ -5589,14 +5647,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_4set_windowed(struct __p } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 317, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 319, __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, 317, __pyx_L1_error) + __PYX_ERR(0, 319, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":316 + /* "pygame/_sdl2/video.pyx":318 * """ * # https://wiki.libsdl.org/SDL_SetWindowFullscreen * if SDL_SetWindowFullscreen(self._win, 0): # <<<<<<<<<<<<<< @@ -5605,7 +5663,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_4set_windowed(struct __p */ } - /* "pygame/_sdl2/video.pyx":310 + /* "pygame/_sdl2/video.pyx":312 * SDL_SetRelativeMouseMode(1 if enable else 0) * * def set_windowed(self): # <<<<<<<<<<<<<< @@ -5620,7 +5678,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_4set_windowed(struct __p __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_AddTraceback("pygame._sdl2.video._Window.set_windowed", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -5628,7 +5686,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_4set_windowed(struct __p return __pyx_r; } -/* "pygame/_sdl2/video.pyx":324 +/* "pygame/_sdl2/video.pyx":326 * # window.fullscreen_desktop = True * # window.windowed = True * def set_fullscreen(self, bint desktop=False): # <<<<<<<<<<<<<< @@ -5637,9 +5695,9 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_4set_windowed(struct __p */ /* Python wrapper */ -static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_7set_fullscreen(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_6pygame_5_sdl2_5video_6Window_6set_fullscreen[] = "Enter fullscreen\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:: :meth:`set_windowed`.\n "; -static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_7set_fullscreen(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7_Window_7set_fullscreen(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_6pygame_5_sdl2_5video_7_Window_6set_fullscreen[] = "Enter fullscreen\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:: :meth:`set_windowed`.\n "; +static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7_Window_7set_fullscreen(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_desktop; int __pyx_lineno = 0; const char *__pyx_filename = NULL; @@ -5668,7 +5726,7 @@ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_7set_fullscreen(PyObject } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_fullscreen") < 0)) __PYX_ERR(0, 324, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_fullscreen") < 0)) __PYX_ERR(0, 326, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -5679,27 +5737,27 @@ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_7set_fullscreen(PyObject } } if (values[0]) { - __pyx_v_desktop = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_desktop == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 324, __pyx_L3_error) + __pyx_v_desktop = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_desktop == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 326, __pyx_L3_error) } else { __pyx_v_desktop = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("set_fullscreen", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 324, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("set_fullscreen", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 326, __pyx_L3_error) __pyx_L3_error:; - __Pyx_AddTraceback("pygame._sdl2.video.Window.set_fullscreen", __pyx_clineno, __pyx_lineno, __pyx_filename); + __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_6set_fullscreen(((struct __pyx_obj_6pygame_5_sdl2_5video_Window *)__pyx_v_self), __pyx_v_desktop); + __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_7_Window_6set_fullscreen(((struct __pyx_obj_6pygame_5_sdl2_5video__Window *)__pyx_v_self), __pyx_v_desktop); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_6set_fullscreen(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self, int __pyx_v_desktop) { +static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7_Window_6set_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 @@ -5712,7 +5770,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_6set_fullscreen(struct _ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_fullscreen", 0); - /* "pygame/_sdl2/video.pyx":332 + /* "pygame/_sdl2/video.pyx":334 * .. seealso:: :meth:`set_windowed`. * """ * cdef int flags = 0 # <<<<<<<<<<<<<< @@ -5721,7 +5779,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_6set_fullscreen(struct _ */ __pyx_v_flags = 0; - /* "pygame/_sdl2/video.pyx":333 + /* "pygame/_sdl2/video.pyx":335 * """ * cdef int flags = 0 * if desktop: # <<<<<<<<<<<<<< @@ -5731,7 +5789,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_6set_fullscreen(struct _ __pyx_t_1 = (__pyx_v_desktop != 0); if (__pyx_t_1) { - /* "pygame/_sdl2/video.pyx":334 + /* "pygame/_sdl2/video.pyx":336 * cdef int flags = 0 * if desktop: * flags = _SDL_WINDOW_FULLSCREEN_DESKTOP # <<<<<<<<<<<<<< @@ -5740,7 +5798,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_6set_fullscreen(struct _ */ __pyx_v_flags = SDL_WINDOW_FULLSCREEN_DESKTOP; - /* "pygame/_sdl2/video.pyx":333 + /* "pygame/_sdl2/video.pyx":335 * """ * cdef int flags = 0 * if desktop: # <<<<<<<<<<<<<< @@ -5750,7 +5808,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_6set_fullscreen(struct _ goto __pyx_L3; } - /* "pygame/_sdl2/video.pyx":336 + /* "pygame/_sdl2/video.pyx":338 * flags = _SDL_WINDOW_FULLSCREEN_DESKTOP * else: * flags = _SDL_WINDOW_FULLSCREEN # <<<<<<<<<<<<<< @@ -5762,7 +5820,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_6set_fullscreen(struct _ } __pyx_L3:; - /* "pygame/_sdl2/video.pyx":337 + /* "pygame/_sdl2/video.pyx":339 * else: * flags = _SDL_WINDOW_FULLSCREEN * if SDL_SetWindowFullscreen(self._win, flags): # <<<<<<<<<<<<<< @@ -5772,14 +5830,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_6set_fullscreen(struct _ __pyx_t_1 = (SDL_SetWindowFullscreen(__pyx_v_self->_win, __pyx_v_flags) != 0); if (unlikely(__pyx_t_1)) { - /* "pygame/_sdl2/video.pyx":338 + /* "pygame/_sdl2/video.pyx":340 * 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, 338, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 340, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { @@ -5793,14 +5851,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_6set_fullscreen(struct _ } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 338, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 340, __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, 338, __pyx_L1_error) + __PYX_ERR(0, 340, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":337 + /* "pygame/_sdl2/video.pyx":339 * else: * flags = _SDL_WINDOW_FULLSCREEN * if SDL_SetWindowFullscreen(self._win, flags): # <<<<<<<<<<<<<< @@ -5809,7 +5867,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_6set_fullscreen(struct _ */ } - /* "pygame/_sdl2/video.pyx":324 + /* "pygame/_sdl2/video.pyx":326 * # window.fullscreen_desktop = True * # window.windowed = True * def set_fullscreen(self, bint desktop=False): # <<<<<<<<<<<<<< @@ -5824,7 +5882,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_6set_fullscreen(struct _ __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_AddTraceback("pygame._sdl2.video._Window.set_fullscreen", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -5832,7 +5890,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_6set_fullscreen(struct _ return __pyx_r; } -/* "pygame/_sdl2/video.pyx":341 +/* "pygame/_sdl2/video.pyx":343 * * @property * def title(self): # <<<<<<<<<<<<<< @@ -5841,19 +5899,19 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_6set_fullscreen(struct _ */ /* 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) { +static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7_Window_5title_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7_Window_5title_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_6Window_5title___get__(((struct __pyx_obj_6pygame_5_sdl2_5video_Window *)__pyx_v_self)); + __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_7_Window_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) { +static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7_Window_5title___get__(struct __pyx_obj_6pygame_5_sdl2_5video__Window *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations char const *__pyx_t_1; @@ -5863,7 +5921,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_5title___get__(struct __ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "pygame/_sdl2/video.pyx":347 + /* "pygame/_sdl2/video.pyx":349 * """ * # https://wiki.libsdl.org/SDL_GetWindowTitle * return SDL_GetWindowTitle(self._win).decode('utf8') # <<<<<<<<<<<<<< @@ -5872,14 +5930,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_5title___get__(struct __ */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = SDL_GetWindowTitle(__pyx_v_self->_win); - __pyx_t_2 = __Pyx_decode_c_string(__pyx_t_1, 0, strlen(__pyx_t_1), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 347, __pyx_L1_error) + __pyx_t_2 = __Pyx_decode_c_string(__pyx_t_1, 0, strlen(__pyx_t_1), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 349, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_2); __pyx_r = __pyx_t_2; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; - /* "pygame/_sdl2/video.pyx":341 + /* "pygame/_sdl2/video.pyx":343 * * @property * def title(self): # <<<<<<<<<<<<<< @@ -5890,7 +5948,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_5title___get__(struct __ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); - __Pyx_AddTraceback("pygame._sdl2.video.Window.title.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("pygame._sdl2.video._Window.title.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -5898,7 +5956,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_5title___get__(struct __ return __pyx_r; } -/* "pygame/_sdl2/video.pyx":350 +/* "pygame/_sdl2/video.pyx":352 * * @title.setter * def title(self, title): # <<<<<<<<<<<<<< @@ -5907,19 +5965,19 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_5title___get__(struct __ */ /* 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) { +static int __pyx_pw_6pygame_5_sdl2_5video_7_Window_5title_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_title); /*proto*/ +static int __pyx_pw_6pygame_5_sdl2_5video_7_Window_5title_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_title) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); - __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)); + __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_7_Window_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) { +static int __pyx_pf_6pygame_5_sdl2_5video_7_Window_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; @@ -5931,14 +5989,14 @@ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_5title_2__set__(struct __pyx_o int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - /* "pygame/_sdl2/video.pyx":352 + /* "pygame/_sdl2/video.pyx":354 * def title(self, title): * # 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, 352, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_title, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 354, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -5952,14 +6010,14 @@ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_5title_2__set__(struct __pyx_o } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_n_s_utf8) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_s_utf8); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 352, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 354, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_t_1); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 352, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_t_1); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 354, __pyx_L1_error) SDL_SetWindowTitle(__pyx_v_self->_win, __pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sdl2/video.pyx":350 + /* "pygame/_sdl2/video.pyx":352 * * @title.setter * def title(self, title): # <<<<<<<<<<<<<< @@ -5974,14 +6032,14 @@ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_5title_2__set__(struct __pyx_o __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_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":354 +/* "pygame/_sdl2/video.pyx":356 * SDL_SetWindowTitle(self._win, title.encode('utf8')) * * def destroy(self): # <<<<<<<<<<<<<< @@ -5990,26 +6048,26 @@ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_5title_2__set__(struct __pyx_o */ /* Python wrapper */ -static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_9destroy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_6pygame_5_sdl2_5video_6Window_8destroy[] = "Destroy the window\n\n Destroys the internal window data of this Window object. This method is\n called automatically when this Window object is garbage collected, so\n there usually aren't any reasons to call it manually.\n\n Other methods that try to manipulate that window data will raise an error.\n "; -static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_9destroy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7_Window_9destroy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_6pygame_5_sdl2_5video_7_Window_8destroy[] = "Destroy the window\n\n Destroys the internal window data of this Window object. This method is\n called automatically when this Window object is garbage collected, so\n there usually aren't any reasons to call it manually.\n\n Other methods that try to manipulate that window data will raise an error.\n "; +static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7_Window_9destroy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("destroy (wrapper)", 0); - __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_6Window_8destroy(((struct __pyx_obj_6pygame_5_sdl2_5video_Window *)__pyx_v_self)); + __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_7_Window_8destroy(((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_8destroy(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self) { +static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7_Window_8destroy(struct __pyx_obj_6pygame_5_sdl2_5video__Window *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("destroy", 0); - /* "pygame/_sdl2/video.pyx":364 + /* "pygame/_sdl2/video.pyx":366 * """ * # https://wiki.libsdl.org/SDL_DestroyWindow * if self._win: # <<<<<<<<<<<<<< @@ -6019,7 +6077,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_8destroy(struct __pyx_ob __pyx_t_1 = (__pyx_v_self->_win != 0); if (__pyx_t_1) { - /* "pygame/_sdl2/video.pyx":365 + /* "pygame/_sdl2/video.pyx":367 * # https://wiki.libsdl.org/SDL_DestroyWindow * if self._win: * SDL_DestroyWindow(self._win) # <<<<<<<<<<<<<< @@ -6028,7 +6086,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_8destroy(struct __pyx_ob */ SDL_DestroyWindow(__pyx_v_self->_win); - /* "pygame/_sdl2/video.pyx":366 + /* "pygame/_sdl2/video.pyx":368 * if self._win: * SDL_DestroyWindow(self._win) * self._win = NULL # <<<<<<<<<<<<<< @@ -6037,7 +6095,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_8destroy(struct __pyx_ob */ __pyx_v_self->_win = NULL; - /* "pygame/_sdl2/video.pyx":364 + /* "pygame/_sdl2/video.pyx":366 * """ * # https://wiki.libsdl.org/SDL_DestroyWindow * if self._win: # <<<<<<<<<<<<<< @@ -6046,7 +6104,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_8destroy(struct __pyx_ob */ } - /* "pygame/_sdl2/video.pyx":354 + /* "pygame/_sdl2/video.pyx":356 * SDL_SetWindowTitle(self._win, title.encode('utf8')) * * def destroy(self): # <<<<<<<<<<<<<< @@ -6061,7 +6119,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_8destroy(struct __pyx_ob return __pyx_r; } -/* "pygame/_sdl2/video.pyx":368 +/* "pygame/_sdl2/video.pyx":370 * self._win = NULL * * def hide(self): # <<<<<<<<<<<<<< @@ -6070,25 +6128,25 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_8destroy(struct __pyx_ob */ /* Python wrapper */ -static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_11hide(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_6pygame_5_sdl2_5video_6Window_10hide[] = "Hide the window\n "; -static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_11hide(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7_Window_11hide(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_6pygame_5_sdl2_5video_7_Window_10hide[] = "Hide the window\n "; +static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7_Window_11hide(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("hide (wrapper)", 0); - __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_6Window_10hide(((struct __pyx_obj_6pygame_5_sdl2_5video_Window *)__pyx_v_self)); + __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_7_Window_10hide(((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_10hide(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self) { +static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7_Window_10hide(struct __pyx_obj_6pygame_5_sdl2_5video__Window *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("hide", 0); - /* "pygame/_sdl2/video.pyx":372 + /* "pygame/_sdl2/video.pyx":374 * """ * # https://wiki.libsdl.org/SDL_HideWindow * SDL_HideWindow(self._win) # <<<<<<<<<<<<<< @@ -6097,7 +6155,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_10hide(struct __pyx_obj_ */ SDL_HideWindow(__pyx_v_self->_win); - /* "pygame/_sdl2/video.pyx":368 + /* "pygame/_sdl2/video.pyx":370 * self._win = NULL * * def hide(self): # <<<<<<<<<<<<<< @@ -6112,7 +6170,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_10hide(struct __pyx_obj_ return __pyx_r; } -/* "pygame/_sdl2/video.pyx":374 +/* "pygame/_sdl2/video.pyx":376 * SDL_HideWindow(self._win) * * def show(self): # <<<<<<<<<<<<<< @@ -6121,25 +6179,25 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_10hide(struct __pyx_obj_ */ /* Python wrapper */ -static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_13show(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_6pygame_5_sdl2_5video_6Window_12show[] = "Show the window\n "; -static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_13show(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7_Window_13show(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_6pygame_5_sdl2_5video_7_Window_12show[] = "Show the window\n "; +static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7_Window_13show(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("show (wrapper)", 0); - __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_6Window_12show(((struct __pyx_obj_6pygame_5_sdl2_5video_Window *)__pyx_v_self)); + __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_7_Window_12show(((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_12show(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self) { +static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7_Window_12show(struct __pyx_obj_6pygame_5_sdl2_5video__Window *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("show", 0); - /* "pygame/_sdl2/video.pyx":378 + /* "pygame/_sdl2/video.pyx":380 * """ * # https://wiki.libsdl.org/SDL_ShowWindow * SDL_ShowWindow(self._win) # <<<<<<<<<<<<<< @@ -6148,7 +6206,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_12show(struct __pyx_obj_ */ SDL_ShowWindow(__pyx_v_self->_win); - /* "pygame/_sdl2/video.pyx":374 + /* "pygame/_sdl2/video.pyx":376 * SDL_HideWindow(self._win) * * def show(self): # <<<<<<<<<<<<<< @@ -6163,7 +6221,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_12show(struct __pyx_obj_ return __pyx_r; } -/* "pygame/_sdl2/video.pyx":380 +/* "pygame/_sdl2/video.pyx":382 * SDL_ShowWindow(self._win) * * def focus(self, input_only=False): # <<<<<<<<<<<<<< @@ -6172,9 +6230,9 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_12show(struct __pyx_obj_ */ /* Python wrapper */ -static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_15focus(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_6pygame_5_sdl2_5video_6Window_14focus[] = "Set the window to be focused\n\n Raises the window above other windows and sets 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 Only supported on X11.\n "; -static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_15focus(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7_Window_15focus(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_6pygame_5_sdl2_5video_7_Window_14focus[] = "Set the window to be focused\n\n Raises the window above other windows and sets 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 Only supported on X11.\n "; +static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7_Window_15focus(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_input_only = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; @@ -6204,7 +6262,7 @@ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_15focus(PyObject *__pyx_ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "focus") < 0)) __PYX_ERR(0, 380, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "focus") < 0)) __PYX_ERR(0, 382, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -6218,20 +6276,20 @@ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_15focus(PyObject *__pyx_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("focus", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 380, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("focus", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 382, __pyx_L3_error) __pyx_L3_error:; - __Pyx_AddTraceback("pygame._sdl2.video.Window.focus", __pyx_clineno, __pyx_lineno, __pyx_filename); + __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_14focus(((struct __pyx_obj_6pygame_5_sdl2_5video_Window *)__pyx_v_self), __pyx_v_input_only); + __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_7_Window_14focus(((struct __pyx_obj_6pygame_5_sdl2_5video__Window *)__pyx_v_self), __pyx_v_input_only); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_14focus(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self, PyObject *__pyx_v_input_only) { +static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7_Window_14focus(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; @@ -6243,17 +6301,17 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_14focus(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("focus", 0); - /* "pygame/_sdl2/video.pyx":390 + /* "pygame/_sdl2/video.pyx":392 * """ * # 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, 390, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_input_only); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 392, __pyx_L1_error) if (__pyx_t_1) { - /* "pygame/_sdl2/video.pyx":391 + /* "pygame/_sdl2/video.pyx":393 * # https://wiki.libsdl.org/SDL_RaiseWindow * if input_only: * if SDL_SetWindowInputFocus(self._win): # <<<<<<<<<<<<<< @@ -6263,14 +6321,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_14focus(struct __pyx_obj __pyx_t_1 = (SDL_SetWindowInputFocus(__pyx_v_self->_win) != 0); if (unlikely(__pyx_t_1)) { - /* "pygame/_sdl2/video.pyx":392 + /* "pygame/_sdl2/video.pyx":394 * 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, 392, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 394, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { @@ -6284,14 +6342,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_14focus(struct __pyx_obj } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 392, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 394, __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, 392, __pyx_L1_error) + __PYX_ERR(0, 394, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":391 + /* "pygame/_sdl2/video.pyx":393 * # https://wiki.libsdl.org/SDL_RaiseWindow * if input_only: * if SDL_SetWindowInputFocus(self._win): # <<<<<<<<<<<<<< @@ -6300,7 +6358,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_14focus(struct __pyx_obj */ } - /* "pygame/_sdl2/video.pyx":390 + /* "pygame/_sdl2/video.pyx":392 * """ * # https://wiki.libsdl.org/SDL_RaiseWindow * if input_only: # <<<<<<<<<<<<<< @@ -6310,7 +6368,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_14focus(struct __pyx_obj goto __pyx_L3; } - /* "pygame/_sdl2/video.pyx":394 + /* "pygame/_sdl2/video.pyx":396 * raise error() * else: * SDL_RaiseWindow(self._win) # <<<<<<<<<<<<<< @@ -6322,7 +6380,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_14focus(struct __pyx_obj } __pyx_L3:; - /* "pygame/_sdl2/video.pyx":380 + /* "pygame/_sdl2/video.pyx":382 * SDL_ShowWindow(self._win) * * def focus(self, input_only=False): # <<<<<<<<<<<<<< @@ -6337,7 +6395,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_14focus(struct __pyx_obj __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_AddTraceback("pygame._sdl2.video._Window.focus", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -6345,7 +6403,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_14focus(struct __pyx_obj return __pyx_r; } -/* "pygame/_sdl2/video.pyx":396 +/* "pygame/_sdl2/video.pyx":398 * SDL_RaiseWindow(self._win) * * def restore(self): # <<<<<<<<<<<<<< @@ -6354,25 +6412,25 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_14focus(struct __pyx_obj */ /* Python wrapper */ -static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_17restore(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_6pygame_5_sdl2_5video_6Window_16restore[] = "Restore the size and position of a minimized or maximized window\n "; -static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_17restore(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7_Window_17restore(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_6pygame_5_sdl2_5video_7_Window_16restore[] = "Restore the size and position of a minimized or maximized window\n "; +static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7_Window_17restore(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("restore (wrapper)", 0); - __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_6Window_16restore(((struct __pyx_obj_6pygame_5_sdl2_5video_Window *)__pyx_v_self)); + __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_7_Window_16restore(((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_16restore(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self) { +static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7_Window_16restore(struct __pyx_obj_6pygame_5_sdl2_5video__Window *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("restore", 0); - /* "pygame/_sdl2/video.pyx":399 + /* "pygame/_sdl2/video.pyx":401 * """Restore the size and position of a minimized or maximized window * """ * SDL_RestoreWindow(self._win) # <<<<<<<<<<<<<< @@ -6381,7 +6439,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_16restore(struct __pyx_o */ SDL_RestoreWindow(__pyx_v_self->_win); - /* "pygame/_sdl2/video.pyx":396 + /* "pygame/_sdl2/video.pyx":398 * SDL_RaiseWindow(self._win) * * def restore(self): # <<<<<<<<<<<<<< @@ -6396,7 +6454,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_16restore(struct __pyx_o return __pyx_r; } -/* "pygame/_sdl2/video.pyx":401 +/* "pygame/_sdl2/video.pyx":403 * SDL_RestoreWindow(self._win) * * def maximize(self): # <<<<<<<<<<<<<< @@ -6405,25 +6463,25 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_16restore(struct __pyx_o */ /* Python wrapper */ -static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_19maximize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_6pygame_5_sdl2_5video_6Window_18maximize[] = "Maximize the window\n "; -static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_19maximize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7_Window_19maximize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_6pygame_5_sdl2_5video_7_Window_18maximize[] = "Maximize the window\n "; +static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7_Window_19maximize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("maximize (wrapper)", 0); - __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_6Window_18maximize(((struct __pyx_obj_6pygame_5_sdl2_5video_Window *)__pyx_v_self)); + __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_7_Window_18maximize(((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_18maximize(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self) { +static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7_Window_18maximize(struct __pyx_obj_6pygame_5_sdl2_5video__Window *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("maximize", 0); - /* "pygame/_sdl2/video.pyx":404 + /* "pygame/_sdl2/video.pyx":406 * """Maximize the window * """ * SDL_MaximizeWindow(self._win) # <<<<<<<<<<<<<< @@ -6432,7 +6490,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_18maximize(struct __pyx_ */ SDL_MaximizeWindow(__pyx_v_self->_win); - /* "pygame/_sdl2/video.pyx":401 + /* "pygame/_sdl2/video.pyx":403 * SDL_RestoreWindow(self._win) * * def maximize(self): # <<<<<<<<<<<<<< @@ -6447,7 +6505,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_18maximize(struct __pyx_ return __pyx_r; } -/* "pygame/_sdl2/video.pyx":406 +/* "pygame/_sdl2/video.pyx":408 * SDL_MaximizeWindow(self._win) * * def minimize(self): # <<<<<<<<<<<<<< @@ -6456,25 +6514,25 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_18maximize(struct __pyx_ */ /* Python wrapper */ -static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_21minimize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_6pygame_5_sdl2_5video_6Window_20minimize[] = "Minimize the window\n "; -static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_21minimize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7_Window_21minimize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_6pygame_5_sdl2_5video_7_Window_20minimize[] = "Minimize the window\n "; +static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7_Window_21minimize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("minimize (wrapper)", 0); - __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_6Window_20minimize(((struct __pyx_obj_6pygame_5_sdl2_5video_Window *)__pyx_v_self)); + __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_7_Window_20minimize(((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_20minimize(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self) { +static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7_Window_20minimize(struct __pyx_obj_6pygame_5_sdl2_5video__Window *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("minimize", 0); - /* "pygame/_sdl2/video.pyx":409 + /* "pygame/_sdl2/video.pyx":411 * """Minimize the window * """ * SDL_MinimizeWindow(self._win) # <<<<<<<<<<<<<< @@ -6483,7 +6541,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_20minimize(struct __pyx_ */ SDL_MinimizeWindow(__pyx_v_self->_win); - /* "pygame/_sdl2/video.pyx":406 + /* "pygame/_sdl2/video.pyx":408 * SDL_MaximizeWindow(self._win) * * def minimize(self): # <<<<<<<<<<<<<< @@ -6498,7 +6556,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_20minimize(struct __pyx_ return __pyx_r; } -/* "pygame/_sdl2/video.pyx":412 +/* "pygame/_sdl2/video.pyx":414 * * @property * def resizable(self): # <<<<<<<<<<<<<< @@ -6507,19 +6565,19 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_20minimize(struct __pyx_ */ /* 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) { +static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7_Window_9resizable_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7_Window_9resizable_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_6Window_9resizable___get__(((struct __pyx_obj_6pygame_5_sdl2_5video_Window *)__pyx_v_self)); + __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_7_Window_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) { +static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7_Window_9resizable___get__(struct __pyx_obj_6pygame_5_sdl2_5video__Window *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -6528,7 +6586,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_9resizable___get__(struc int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "pygame/_sdl2/video.pyx":415 + /* "pygame/_sdl2/video.pyx":417 * """Get or set whether the window is resizable * """ * return SDL_GetWindowFlags(self._win) & _SDL_WINDOW_RESIZABLE != 0 # <<<<<<<<<<<<<< @@ -6536,13 +6594,13 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_9resizable___get__(struc * @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, 415, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(((SDL_GetWindowFlags(__pyx_v_self->_win) & SDL_WINDOW_RESIZABLE) != 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 417, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "pygame/_sdl2/video.pyx":412 + /* "pygame/_sdl2/video.pyx":414 * * @property * def resizable(self): # <<<<<<<<<<<<<< @@ -6553,7 +6611,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_9resizable___get__(struc /* 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_AddTraceback("pygame._sdl2.video._Window.resizable.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -6561,7 +6619,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_9resizable___get__(struc return __pyx_r; } -/* "pygame/_sdl2/video.pyx":418 +/* "pygame/_sdl2/video.pyx":420 * * @resizable.setter * def resizable(self, enabled): # <<<<<<<<<<<<<< @@ -6570,19 +6628,19 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_9resizable___get__(struc */ /* 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) { +static int __pyx_pw_6pygame_5_sdl2_5video_7_Window_9resizable_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_enabled); /*proto*/ +static int __pyx_pw_6pygame_5_sdl2_5video_7_Window_9resizable_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_enabled) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); - __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)); + __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_7_Window_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) { +static int __pyx_pf_6pygame_5_sdl2_5video_7_Window_9resizable_2__set__(struct __pyx_obj_6pygame_5_sdl2_5video__Window *__pyx_v_self, PyObject *__pyx_v_enabled) { int __pyx_r; __Pyx_RefNannyDeclarations SDL_bool __pyx_t_1; @@ -6592,14 +6650,14 @@ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_9resizable_2__set__(struct __p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - /* "pygame/_sdl2/video.pyx":419 + /* "pygame/_sdl2/video.pyx":421 * @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, 419, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_enabled); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 421, __pyx_L1_error) if (__pyx_t_2) { __pyx_t_1 = 1; } else { @@ -6607,7 +6665,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_9resizable_2__set__(struct __p } SDL_SetWindowResizable(__pyx_v_self->_win, __pyx_t_1); - /* "pygame/_sdl2/video.pyx":418 + /* "pygame/_sdl2/video.pyx":420 * * @resizable.setter * def resizable(self, enabled): # <<<<<<<<<<<<<< @@ -6619,14 +6677,14 @@ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_9resizable_2__set__(struct __p __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; - __Pyx_AddTraceback("pygame._sdl2.video.Window.resizable.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("pygame._sdl2.video._Window.resizable.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "pygame/_sdl2/video.pyx":422 +/* "pygame/_sdl2/video.pyx":424 * * @property * def borderless(self): # <<<<<<<<<<<<<< @@ -6635,19 +6693,19 @@ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_9resizable_2__set__(struct __p */ /* 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) { +static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7_Window_10borderless_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7_Window_10borderless_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_6Window_10borderless___get__(((struct __pyx_obj_6pygame_5_sdl2_5video_Window *)__pyx_v_self)); + __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_7_Window_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) { +static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7_Window_10borderless___get__(struct __pyx_obj_6pygame_5_sdl2_5video__Window *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -6656,7 +6714,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_10borderless___get__(str int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "pygame/_sdl2/video.pyx":429 + /* "pygame/_sdl2/video.pyx":431 * .. note:: You can't change the border state of a fullscreen window. * """ * return SDL_GetWindowFlags(self._win) & _SDL_WINDOW_BORDERLESS != 0 # <<<<<<<<<<<<<< @@ -6664,13 +6722,13 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_10borderless___get__(str * @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, 429, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(((SDL_GetWindowFlags(__pyx_v_self->_win) & SDL_WINDOW_BORDERLESS) != 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 431, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "pygame/_sdl2/video.pyx":422 + /* "pygame/_sdl2/video.pyx":424 * * @property * def borderless(self): # <<<<<<<<<<<<<< @@ -6681,7 +6739,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_10borderless___get__(str /* 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_AddTraceback("pygame._sdl2.video._Window.borderless.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -6689,7 +6747,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_10borderless___get__(str return __pyx_r; } -/* "pygame/_sdl2/video.pyx":432 +/* "pygame/_sdl2/video.pyx":434 * * @borderless.setter * def borderless(self, enabled): # <<<<<<<<<<<<<< @@ -6698,19 +6756,19 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_10borderless___get__(str */ /* 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) { +static int __pyx_pw_6pygame_5_sdl2_5video_7_Window_10borderless_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_enabled); /*proto*/ +static int __pyx_pw_6pygame_5_sdl2_5video_7_Window_10borderless_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_enabled) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); - __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)); + __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_7_Window_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) { +static int __pyx_pf_6pygame_5_sdl2_5video_7_Window_10borderless_2__set__(struct __pyx_obj_6pygame_5_sdl2_5video__Window *__pyx_v_self, PyObject *__pyx_v_enabled) { int __pyx_r; __Pyx_RefNannyDeclarations SDL_bool __pyx_t_1; @@ -6720,14 +6778,14 @@ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_10borderless_2__set__(struct _ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - /* "pygame/_sdl2/video.pyx":433 + /* "pygame/_sdl2/video.pyx":435 * @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, 433, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_enabled); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 435, __pyx_L1_error) if (__pyx_t_2) { __pyx_t_1 = 0; } else { @@ -6735,7 +6793,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_10borderless_2__set__(struct _ } SDL_SetWindowBordered(__pyx_v_self->_win, __pyx_t_1); - /* "pygame/_sdl2/video.pyx":432 + /* "pygame/_sdl2/video.pyx":434 * * @borderless.setter * def borderless(self, enabled): # <<<<<<<<<<<<<< @@ -6747,14 +6805,14 @@ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_10borderless_2__set__(struct _ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; - __Pyx_AddTraceback("pygame._sdl2.video.Window.borderless.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("pygame._sdl2.video._Window.borderless.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "pygame/_sdl2/video.pyx":435 +/* "pygame/_sdl2/video.pyx":437 * SDL_SetWindowBordered(self._win, 0 if enabled else 1) * * def set_icon(self, surface): # <<<<<<<<<<<<<< @@ -6763,20 +6821,20 @@ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_10borderless_2__set__(struct _ */ /* Python wrapper */ -static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_23set_icon(PyObject *__pyx_v_self, PyObject *__pyx_v_surface); /*proto*/ -static char __pyx_doc_6pygame_5_sdl2_5video_6Window_22set_icon[] = "Set the window icon\n\n Sets the window icon.\n\n :param pygame.Surface surface: A Surface to use as the icon.\n "; -static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_23set_icon(PyObject *__pyx_v_self, PyObject *__pyx_v_surface) { +static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7_Window_23set_icon(PyObject *__pyx_v_self, PyObject *__pyx_v_surface); /*proto*/ +static char __pyx_doc_6pygame_5_sdl2_5video_7_Window_22set_icon[] = "Set the window icon\n\n Sets the window icon.\n\n :param pygame.Surface surface: A Surface to use as the icon.\n "; +static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7_Window_23set_icon(PyObject *__pyx_v_self, PyObject *__pyx_v_surface) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_icon (wrapper)", 0); - __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_6Window_22set_icon(((struct __pyx_obj_6pygame_5_sdl2_5video_Window *)__pyx_v_self), ((PyObject *)__pyx_v_surface)); + __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_7_Window_22set_icon(((struct __pyx_obj_6pygame_5_sdl2_5video__Window *)__pyx_v_self), ((PyObject *)__pyx_v_surface)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_22set_icon(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self, PyObject *__pyx_v_surface) { +static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7_Window_22set_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; @@ -6786,7 +6844,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_22set_icon(struct __pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_icon", 0); - /* "pygame/_sdl2/video.pyx":442 + /* "pygame/_sdl2/video.pyx":444 * :param pygame.Surface surface: A Surface to use as the icon. * """ * if not pgSurface_Check(surface): # <<<<<<<<<<<<<< @@ -6796,20 +6854,20 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_22set_icon(struct __pyx_ __pyx_t_1 = ((!(pgSurface_Check(__pyx_v_surface) != 0)) != 0); if (unlikely(__pyx_t_1)) { - /* "pygame/_sdl2/video.pyx":443 + /* "pygame/_sdl2/video.pyx":445 * """ * 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__6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 443, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 445, __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, 443, __pyx_L1_error) + __PYX_ERR(0, 445, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":442 + /* "pygame/_sdl2/video.pyx":444 * :param pygame.Surface surface: A Surface to use as the icon. * """ * if not pgSurface_Check(surface): # <<<<<<<<<<<<<< @@ -6818,7 +6876,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_22set_icon(struct __pyx_ */ } - /* "pygame/_sdl2/video.pyx":444 + /* "pygame/_sdl2/video.pyx":446 * if not pgSurface_Check(surface): * raise TypeError('surface must be a Surface object') * SDL_SetWindowIcon(self._win, pgSurface_AsSurface(surface)) # <<<<<<<<<<<<<< @@ -6827,7 +6885,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_22set_icon(struct __pyx_ */ SDL_SetWindowIcon(__pyx_v_self->_win, pgSurface_AsSurface(__pyx_v_surface)); - /* "pygame/_sdl2/video.pyx":435 + /* "pygame/_sdl2/video.pyx":437 * SDL_SetWindowBordered(self._win, 0 if enabled else 1) * * def set_icon(self, surface): # <<<<<<<<<<<<<< @@ -6840,7 +6898,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_22set_icon(struct __pyx_ 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_AddTraceback("pygame._sdl2.video._Window.set_icon", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -6848,7 +6906,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_22set_icon(struct __pyx_ return __pyx_r; } -/* "pygame/_sdl2/video.pyx":447 +/* "pygame/_sdl2/video.pyx":449 * * @property * def id(self): # <<<<<<<<<<<<<< @@ -6857,19 +6915,19 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_22set_icon(struct __pyx_ */ /* 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) { +static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7_Window_2id_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7_Window_2id_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_6Window_2id___get__(((struct __pyx_obj_6pygame_5_sdl2_5video_Window *)__pyx_v_self)); + __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_7_Window_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) { +static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7_Window_2id___get__(struct __pyx_obj_6pygame_5_sdl2_5video__Window *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -6878,7 +6936,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_2id___get__(struct __pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "pygame/_sdl2/video.pyx":450 + /* "pygame/_sdl2/video.pyx":452 * """Get the unique window ID (**read-only**) * """ * return SDL_GetWindowID(self._win) # <<<<<<<<<<<<<< @@ -6886,13 +6944,13 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_2id___get__(struct __pyx * @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, 450, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_Uint32(SDL_GetWindowID(__pyx_v_self->_win)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 452, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "pygame/_sdl2/video.pyx":447 + /* "pygame/_sdl2/video.pyx":449 * * @property * def id(self): # <<<<<<<<<<<<<< @@ -6903,7 +6961,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_2id___get__(struct __pyx /* 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_AddTraceback("pygame._sdl2.video._Window.id.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -6911,7 +6969,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_2id___get__(struct __pyx return __pyx_r; } -/* "pygame/_sdl2/video.pyx":453 +/* "pygame/_sdl2/video.pyx":455 * * @property * def size(self): # <<<<<<<<<<<<<< @@ -6920,19 +6978,19 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_2id___get__(struct __pyx */ /* 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) { +static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7_Window_4size_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7_Window_4size_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_6Window_4size___get__(((struct __pyx_obj_6pygame_5_sdl2_5video_Window *)__pyx_v_self)); + __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_7_Window_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) { +static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7_Window_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; @@ -6945,7 +7003,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_4size___get__(struct __p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "pygame/_sdl2/video.pyx":456 + /* "pygame/_sdl2/video.pyx":458 * """Get or set the window size in pixels""" * cdef int w, h * SDL_GetWindowSize(self._win, &w, &h) # <<<<<<<<<<<<<< @@ -6954,7 +7012,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_4size___get__(struct __p */ SDL_GetWindowSize(__pyx_v_self->_win, (&__pyx_v_w), (&__pyx_v_h)); - /* "pygame/_sdl2/video.pyx":457 + /* "pygame/_sdl2/video.pyx":459 * cdef int w, h * SDL_GetWindowSize(self._win, &w, &h) * return (w, h) # <<<<<<<<<<<<<< @@ -6962,11 +7020,11 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_4size___get__(struct __p * @size.setter */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_w); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 457, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_w); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 459, __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, 457, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_h); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 459, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 457, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 459, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); @@ -6978,7 +7036,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_4size___get__(struct __p __pyx_t_3 = 0; goto __pyx_L0; - /* "pygame/_sdl2/video.pyx":453 + /* "pygame/_sdl2/video.pyx":455 * * @property * def size(self): # <<<<<<<<<<<<<< @@ -6991,7 +7049,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_4size___get__(struct __p __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_AddTraceback("pygame._sdl2.video._Window.size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -6999,7 +7057,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_4size___get__(struct __p return __pyx_r; } -/* "pygame/_sdl2/video.pyx":460 +/* "pygame/_sdl2/video.pyx":462 * * @size.setter * def size(self, size): # <<<<<<<<<<<<<< @@ -7008,19 +7066,19 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_4size___get__(struct __p */ /* 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) { +static int __pyx_pw_6pygame_5_sdl2_5video_7_Window_4size_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_size); /*proto*/ +static int __pyx_pw_6pygame_5_sdl2_5video_7_Window_4size_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_size) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); - __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)); + __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_7_Window_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) { +static int __pyx_pf_6pygame_5_sdl2_5video_7_Window_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; @@ -7031,24 +7089,24 @@ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_4size_2__set__(struct __pyx_ob int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - /* "pygame/_sdl2/video.pyx":461 + /* "pygame/_sdl2/video.pyx":463 * @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, 461, __pyx_L1_error) + __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, 463, __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, 461, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 463, __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, 461, __pyx_L1_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, 463, __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, 461, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 463, __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":460 + /* "pygame/_sdl2/video.pyx":462 * * @size.setter * def size(self, size): # <<<<<<<<<<<<<< @@ -7061,14 +7119,14 @@ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_4size_2__set__(struct __pyx_ob 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_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":464 +/* "pygame/_sdl2/video.pyx":466 * * @property * def position(self): # <<<<<<<<<<<<<< @@ -7077,19 +7135,19 @@ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_4size_2__set__(struct __pyx_ob */ /* 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) { +static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7_Window_8position_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7_Window_8position_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_6Window_8position___get__(((struct __pyx_obj_6pygame_5_sdl2_5video_Window *)__pyx_v_self)); + __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_7_Window_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) { +static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7_Window_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; @@ -7102,7 +7160,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_8position___get__(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "pygame/_sdl2/video.pyx":468 + /* "pygame/_sdl2/video.pyx":470 * """ * cdef int x, y * SDL_GetWindowPosition(self._win, &x, &y) # <<<<<<<<<<<<<< @@ -7111,7 +7169,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_8position___get__(struct */ SDL_GetWindowPosition(__pyx_v_self->_win, (&__pyx_v_x), (&__pyx_v_y)); - /* "pygame/_sdl2/video.pyx":469 + /* "pygame/_sdl2/video.pyx":471 * cdef int x, y * SDL_GetWindowPosition(self._win, &x, &y) * return (x, y) # <<<<<<<<<<<<<< @@ -7119,11 +7177,11 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_8position___get__(struct * @position.setter */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 469, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 471, __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, 469, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 471, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 469, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 471, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); @@ -7135,7 +7193,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_8position___get__(struct __pyx_t_3 = 0; goto __pyx_L0; - /* "pygame/_sdl2/video.pyx":464 + /* "pygame/_sdl2/video.pyx":466 * * @property * def position(self): # <<<<<<<<<<<<<< @@ -7148,7 +7206,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_8position___get__(struct __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_AddTraceback("pygame._sdl2.video._Window.position.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -7156,7 +7214,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_8position___get__(struct return __pyx_r; } -/* "pygame/_sdl2/video.pyx":472 +/* "pygame/_sdl2/video.pyx":474 * * @position.setter * def position(self, position): # <<<<<<<<<<<<<< @@ -7165,19 +7223,19 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_8position___get__(struct */ /* 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) { +static int __pyx_pw_6pygame_5_sdl2_5video_7_Window_8position_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_position); /*proto*/ +static int __pyx_pw_6pygame_5_sdl2_5video_7_Window_8position_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_position) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); - __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)); + __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_7_Window_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) { +static int __pyx_pf_6pygame_5_sdl2_5video_7_Window_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; @@ -7194,40 +7252,40 @@ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_8position_2__set__(struct __py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - /* "pygame/_sdl2/video.pyx":474 + /* "pygame/_sdl2/video.pyx":476 * 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, 474, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_WINDOWPOS_UNDEFINED); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 476, __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, 474, __pyx_L1_error) + __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, 476, __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, 474, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 476, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { - /* "pygame/_sdl2/video.pyx":475 + /* "pygame/_sdl2/video.pyx":477 * 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, 475, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_WINDOWPOS_UNDEFINED); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 477, __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, 475, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 477, __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, 475, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_WINDOWPOS_UNDEFINED); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 477, __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, 475, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 477, __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":474 + /* "pygame/_sdl2/video.pyx":476 * def position(self, position): * cdef int x, y * if position == WINDOWPOS_UNDEFINED: # <<<<<<<<<<<<<< @@ -7237,40 +7295,40 @@ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_8position_2__set__(struct __py goto __pyx_L3; } - /* "pygame/_sdl2/video.pyx":476 + /* "pygame/_sdl2/video.pyx":478 * 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, 476, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_WINDOWPOS_CENTERED); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 478, __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, 476, __pyx_L1_error) + __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, 478, __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, 476, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 478, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { - /* "pygame/_sdl2/video.pyx":477 + /* "pygame/_sdl2/video.pyx":479 * 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, 477, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_WINDOWPOS_CENTERED); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 479, __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, 477, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 479, __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, 477, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_WINDOWPOS_CENTERED); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 479, __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, 477, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 479, __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":476 + /* "pygame/_sdl2/video.pyx":478 * if position == WINDOWPOS_UNDEFINED: * x, y = WINDOWPOS_UNDEFINED, WINDOWPOS_UNDEFINED * elif position == WINDOWPOS_CENTERED: # <<<<<<<<<<<<<< @@ -7280,7 +7338,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_8position_2__set__(struct __py goto __pyx_L3; } - /* "pygame/_sdl2/video.pyx":479 + /* "pygame/_sdl2/video.pyx":481 * x, y = WINDOWPOS_CENTERED, WINDOWPOS_CENTERED * else: * x, y = position # <<<<<<<<<<<<<< @@ -7294,7 +7352,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_8position_2__set__(struct __py if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 479, __pyx_L1_error) + __PYX_ERR(0, 481, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -7307,21 +7365,21 @@ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_8position_2__set__(struct __py __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, 479, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 481, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 479, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 481, __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, 479, __pyx_L1_error) + __pyx_t_6 = PyObject_GetIter(__pyx_v_position); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 481, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext; 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, 479, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(0, 481, __pyx_L1_error) __pyx_t_7 = NULL; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L5_unpacking_done; @@ -7329,19 +7387,19 @@ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_8position_2__set__(struct __py __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 479, __pyx_L1_error) + __PYX_ERR(0, 481, __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, 479, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 481, __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, 479, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 481, __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":480 + /* "pygame/_sdl2/video.pyx":482 * else: * x, y = position * SDL_SetWindowPosition(self._win, x, y) # <<<<<<<<<<<<<< @@ -7350,7 +7408,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_8position_2__set__(struct __py */ SDL_SetWindowPosition(__pyx_v_self->_win, __pyx_v_x, __pyx_v_y); - /* "pygame/_sdl2/video.pyx":472 + /* "pygame/_sdl2/video.pyx":474 * * @position.setter * def position(self, position): # <<<<<<<<<<<<<< @@ -7365,14 +7423,14 @@ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_8position_2__set__(struct __py __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_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":483 +/* "pygame/_sdl2/video.pyx":485 * * @property * def opacity(self): # <<<<<<<<<<<<<< @@ -7381,19 +7439,19 @@ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_8position_2__set__(struct __py */ /* 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) { +static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7_Window_7opacity_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7_Window_7opacity_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_6Window_7opacity___get__(((struct __pyx_obj_6pygame_5_sdl2_5video_Window *)__pyx_v_self)); + __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_7_Window_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) { +static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7_Window_7opacity___get__(struct __pyx_obj_6pygame_5_sdl2_5video__Window *__pyx_v_self) { float __pyx_v_opacity; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -7406,7 +7464,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_7opacity___get__(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "pygame/_sdl2/video.pyx":487 + /* "pygame/_sdl2/video.pyx":489 * """ * cdef float opacity * if SDL_GetWindowOpacity(self._win, &opacity): # <<<<<<<<<<<<<< @@ -7416,14 +7474,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_7opacity___get__(struct __pyx_t_1 = (SDL_GetWindowOpacity(__pyx_v_self->_win, (&__pyx_v_opacity)) != 0); if (unlikely(__pyx_t_1)) { - /* "pygame/_sdl2/video.pyx":488 + /* "pygame/_sdl2/video.pyx":490 * 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, 488, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 490, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { @@ -7437,14 +7495,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_7opacity___get__(struct } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 488, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 490, __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, 488, __pyx_L1_error) + __PYX_ERR(0, 490, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":487 + /* "pygame/_sdl2/video.pyx":489 * """ * cdef float opacity * if SDL_GetWindowOpacity(self._win, &opacity): # <<<<<<<<<<<<<< @@ -7453,7 +7511,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_7opacity___get__(struct */ } - /* "pygame/_sdl2/video.pyx":489 + /* "pygame/_sdl2/video.pyx":491 * if SDL_GetWindowOpacity(self._win, &opacity): * raise error() * return opacity # <<<<<<<<<<<<<< @@ -7461,13 +7519,13 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_7opacity___get__(struct * @opacity.setter */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = PyFloat_FromDouble(__pyx_v_opacity); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 489, __pyx_L1_error) + __pyx_t_2 = PyFloat_FromDouble(__pyx_v_opacity); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 491, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "pygame/_sdl2/video.pyx":483 + /* "pygame/_sdl2/video.pyx":485 * * @property * def opacity(self): # <<<<<<<<<<<<<< @@ -7480,7 +7538,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_7opacity___get__(struct __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_AddTraceback("pygame._sdl2.video._Window.opacity.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -7488,7 +7546,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_7opacity___get__(struct return __pyx_r; } -/* "pygame/_sdl2/video.pyx":492 +/* "pygame/_sdl2/video.pyx":494 * * @opacity.setter * def opacity(self, opacity): # <<<<<<<<<<<<<< @@ -7497,19 +7555,19 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_7opacity___get__(struct */ /* 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) { +static int __pyx_pw_6pygame_5_sdl2_5video_7_Window_7opacity_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_opacity); /*proto*/ +static int __pyx_pw_6pygame_5_sdl2_5video_7_Window_7opacity_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_opacity) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); - __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)); + __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_7_Window_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) { +static int __pyx_pf_6pygame_5_sdl2_5video_7_Window_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; @@ -7522,25 +7580,25 @@ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_7opacity_2__set__(struct __pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - /* "pygame/_sdl2/video.pyx":493 + /* "pygame/_sdl2/video.pyx":495 * @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, 493, __pyx_L1_error) + __pyx_t_1 = __pyx_PyFloat_AsFloat(__pyx_v_opacity); if (unlikely((__pyx_t_1 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 495, __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":494 + /* "pygame/_sdl2/video.pyx":496 * 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, 494, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_error); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 496, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { @@ -7554,14 +7612,14 @@ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_7opacity_2__set__(struct __pyx } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 494, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 496, __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, 494, __pyx_L1_error) + __PYX_ERR(0, 496, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":493 + /* "pygame/_sdl2/video.pyx":495 * @opacity.setter * def opacity(self, opacity): * if SDL_SetWindowOpacity(self._win, opacity): # <<<<<<<<<<<<<< @@ -7570,7 +7628,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_7opacity_2__set__(struct __pyx */ } - /* "pygame/_sdl2/video.pyx":492 + /* "pygame/_sdl2/video.pyx":494 * * @opacity.setter * def opacity(self, opacity): # <<<<<<<<<<<<<< @@ -7585,14 +7643,14 @@ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_7opacity_2__set__(struct __pyx __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_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":497 +/* "pygame/_sdl2/video.pyx":499 * * @property * def display_index(self): # <<<<<<<<<<<<<< @@ -7601,19 +7659,19 @@ static int __pyx_pf_6pygame_5_sdl2_5video_6Window_7opacity_2__set__(struct __pyx */ /* 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) { +static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7_Window_13display_index_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7_Window_13display_index_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_6Window_13display_index___get__(((struct __pyx_obj_6pygame_5_sdl2_5video_Window *)__pyx_v_self)); + __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_7_Window_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) { +static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7_Window_13display_index___get__(struct __pyx_obj_6pygame_5_sdl2_5video__Window *__pyx_v_self) { int __pyx_v_index; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -7626,7 +7684,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_13display_index___get__( int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "pygame/_sdl2/video.pyx":500 + /* "pygame/_sdl2/video.pyx":502 * """Get the index of the display that owns the window * """ * cdef int index = SDL_GetWindowDisplayIndex(self._win) # <<<<<<<<<<<<<< @@ -7635,7 +7693,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_13display_index___get__( */ __pyx_v_index = SDL_GetWindowDisplayIndex(__pyx_v_self->_win); - /* "pygame/_sdl2/video.pyx":501 + /* "pygame/_sdl2/video.pyx":503 * """ * cdef int index = SDL_GetWindowDisplayIndex(self._win) * if index < 0: # <<<<<<<<<<<<<< @@ -7645,14 +7703,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_13display_index___get__( __pyx_t_1 = ((__pyx_v_index < 0) != 0); if (unlikely(__pyx_t_1)) { - /* "pygame/_sdl2/video.pyx":502 + /* "pygame/_sdl2/video.pyx":504 * 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, 502, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 504, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { @@ -7666,14 +7724,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_13display_index___get__( } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 502, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 504, __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, 502, __pyx_L1_error) + __PYX_ERR(0, 504, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":501 + /* "pygame/_sdl2/video.pyx":503 * """ * cdef int index = SDL_GetWindowDisplayIndex(self._win) * if index < 0: # <<<<<<<<<<<<<< @@ -7682,7 +7740,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_13display_index___get__( */ } - /* "pygame/_sdl2/video.pyx":503 + /* "pygame/_sdl2/video.pyx":505 * if index < 0: * raise error() * return index # <<<<<<<<<<<<<< @@ -7690,13 +7748,13 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_13display_index___get__( * 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, 503, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 505, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "pygame/_sdl2/video.pyx":497 + /* "pygame/_sdl2/video.pyx":499 * * @property * def display_index(self): # <<<<<<<<<<<<<< @@ -7709,7 +7767,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_13display_index___get__( __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_AddTraceback("pygame._sdl2.video._Window.display_index.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -7717,7 +7775,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_13display_index___get__( return __pyx_r; } -/* "pygame/_sdl2/video.pyx":505 +/* "pygame/_sdl2/video.pyx":507 * return index * * def set_modal_for(self, Window parent): # <<<<<<<<<<<<<< @@ -7726,17 +7784,17 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_13display_index___get__( */ /* Python wrapper */ -static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_25set_modal_for(PyObject *__pyx_v_self, PyObject *__pyx_v_parent); /*proto*/ -static char __pyx_doc_6pygame_5_sdl2_5video_6Window_24set_modal_for[] = "Set the window as a modal for a parent window\n\n :param Window parent: The parent window.\n\n .. note:: This function is only supported on X11.\n "; -static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_25set_modal_for(PyObject *__pyx_v_self, PyObject *__pyx_v_parent) { +static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7_Window_25set_modal_for(PyObject *__pyx_v_self, PyObject *__pyx_v_parent); /*proto*/ +static char __pyx_doc_6pygame_5_sdl2_5video_7_Window_24set_modal_for[] = "Set the window as a modal for a parent window\n\n :param Window parent: The parent window.\n\n .. note:: This function is only supported on X11.\n "; +static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7_Window_25set_modal_for(PyObject *__pyx_v_self, PyObject *__pyx_v_parent) { 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 (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parent), __pyx_ptype_6pygame_5_sdl2_5video_Window, 1, "parent", 0))) __PYX_ERR(0, 505, __pyx_L1_error) - __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_6Window_24set_modal_for(((struct __pyx_obj_6pygame_5_sdl2_5video_Window *)__pyx_v_self), ((struct __pyx_obj_6pygame_5_sdl2_5video_Window *)__pyx_v_parent)); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parent), __pyx_ptype_6pygame_5_sdl2_5video_Window, 1, "parent", 0))) __PYX_ERR(0, 507, __pyx_L1_error) + __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_7_Window_24set_modal_for(((struct __pyx_obj_6pygame_5_sdl2_5video__Window *)__pyx_v_self), ((pgWindowObject *)__pyx_v_parent)); /* function exit code */ goto __pyx_L0; @@ -7747,7 +7805,7 @@ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_25set_modal_for(PyObject return __pyx_r; } -static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_24set_modal_for(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self, struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_parent) { +static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7_Window_24set_modal_for(struct __pyx_obj_6pygame_5_sdl2_5video__Window *__pyx_v_self, pgWindowObject *__pyx_v_parent) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; @@ -7759,7 +7817,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_24set_modal_for(struct _ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_modal_for", 0); - /* "pygame/_sdl2/video.pyx":512 + /* "pygame/_sdl2/video.pyx":514 * .. note:: This function is only supported on X11. * """ * if SDL_SetWindowModalFor(self._win, parent._win): # <<<<<<<<<<<<<< @@ -7769,14 +7827,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_24set_modal_for(struct _ __pyx_t_1 = (SDL_SetWindowModalFor(__pyx_v_self->_win, __pyx_v_parent->_win) != 0); if (unlikely(__pyx_t_1)) { - /* "pygame/_sdl2/video.pyx":513 + /* "pygame/_sdl2/video.pyx":515 * """ * 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, 513, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 515, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { @@ -7790,14 +7848,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_24set_modal_for(struct _ } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 513, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 515, __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, 513, __pyx_L1_error) + __PYX_ERR(0, 515, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":512 + /* "pygame/_sdl2/video.pyx":514 * .. note:: This function is only supported on X11. * """ * if SDL_SetWindowModalFor(self._win, parent._win): # <<<<<<<<<<<<<< @@ -7806,7 +7864,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_24set_modal_for(struct _ */ } - /* "pygame/_sdl2/video.pyx":505 + /* "pygame/_sdl2/video.pyx":507 * return index * * def set_modal_for(self, Window parent): # <<<<<<<<<<<<<< @@ -7821,7 +7879,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_24set_modal_for(struct _ __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_AddTraceback("pygame._sdl2.video._Window.set_modal_for", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -7829,7 +7887,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_24set_modal_for(struct _ return __pyx_r; } -/* "pygame/_sdl2/video.pyx":515 +/* "pygame/_sdl2/video.pyx":517 * raise error() * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -7838,17 +7896,17 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_24set_modal_for(struct _ */ /* Python wrapper */ -static void __pyx_pw_6pygame_5_sdl2_5video_6Window_27__dealloc__(PyObject *__pyx_v_self); /*proto*/ -static void __pyx_pw_6pygame_5_sdl2_5video_6Window_27__dealloc__(PyObject *__pyx_v_self) { +static void __pyx_pw_6pygame_5_sdl2_5video_7_Window_27__dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_pw_6pygame_5_sdl2_5video_7_Window_27__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); - __pyx_pf_6pygame_5_sdl2_5video_6Window_26__dealloc__(((struct __pyx_obj_6pygame_5_sdl2_5video_Window *)__pyx_v_self)); + __pyx_pf_6pygame_5_sdl2_5video_7_Window_26__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_26__dealloc__(struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self) { +static void __pyx_pf_6pygame_5_sdl2_5video_7_Window_26__dealloc__(struct __pyx_obj_6pygame_5_sdl2_5video__Window *__pyx_v_self) { __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; @@ -7859,7 +7917,7 @@ static void __pyx_pf_6pygame_5_sdl2_5video_6Window_26__dealloc__(struct __pyx_ob int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "pygame/_sdl2/video.pyx":516 + /* "pygame/_sdl2/video.pyx":518 * * def __dealloc__(self): * if self._is_borrowed: # <<<<<<<<<<<<<< @@ -7869,7 +7927,7 @@ static void __pyx_pf_6pygame_5_sdl2_5video_6Window_26__dealloc__(struct __pyx_ob __pyx_t_1 = (__pyx_v_self->_is_borrowed != 0); if (__pyx_t_1) { - /* "pygame/_sdl2/video.pyx":517 + /* "pygame/_sdl2/video.pyx":519 * def __dealloc__(self): * if self._is_borrowed: * return # <<<<<<<<<<<<<< @@ -7878,7 +7936,7 @@ static void __pyx_pf_6pygame_5_sdl2_5video_6Window_26__dealloc__(struct __pyx_ob */ goto __pyx_L0; - /* "pygame/_sdl2/video.pyx":516 + /* "pygame/_sdl2/video.pyx":518 * * def __dealloc__(self): * if self._is_borrowed: # <<<<<<<<<<<<<< @@ -7887,14 +7945,14 @@ static void __pyx_pf_6pygame_5_sdl2_5video_6Window_26__dealloc__(struct __pyx_ob */ } - /* "pygame/_sdl2/video.pyx":518 + /* "pygame/_sdl2/video.pyx":520 * 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, 518, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_destroy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 520, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -7908,12 +7966,12 @@ static void __pyx_pf_6pygame_5_sdl2_5video_6Window_26__dealloc__(struct __pyx_ob } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 518, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 520, __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":515 + /* "pygame/_sdl2/video.pyx":517 * raise error() * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -7927,7 +7985,7 @@ static void __pyx_pf_6pygame_5_sdl2_5video_6Window_26__dealloc__(struct __pyx_ob __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_WriteUnraisable("pygame._sdl2.video._Window.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; __Pyx_RefNannyFinishContext(); } @@ -7939,19 +7997,19 @@ static void __pyx_pf_6pygame_5_sdl2_5video_6Window_26__dealloc__(struct __pyx_ob */ /* Python wrapper */ -static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_29__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_29__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7_Window_29__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7_Window_29__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); - __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_6Window_28__reduce_cython__(((struct __pyx_obj_6pygame_5_sdl2_5video_Window *)__pyx_v_self)); + __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_7_Window_28__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_28__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self) { +static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7_Window_28__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6pygame_5_sdl2_5video__Window *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -7981,7 +8039,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_28__reduce_cython__(CYTH /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("pygame._sdl2.video.Window.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("pygame._sdl2.video._Window.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); @@ -7996,19 +8054,19 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_28__reduce_cython__(CYTH */ /* Python wrapper */ -static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_31__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ -static PyObject *__pyx_pw_6pygame_5_sdl2_5video_6Window_31__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7_Window_31__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ +static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7_Window_31__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); - __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_6Window_30__setstate_cython__(((struct __pyx_obj_6pygame_5_sdl2_5video_Window *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); + __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_7_Window_30__setstate_cython__(((struct __pyx_obj_6pygame_5_sdl2_5video__Window *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_30__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6pygame_5_sdl2_5video_Window *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7_Window_30__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 PyObject *__pyx_t_1 = NULL; @@ -8038,14 +8096,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_6Window_30__setstate_cython__(CY /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("pygame._sdl2.video.Window.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __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":520 +/* "pygame/_sdl2/video.pyx":522 * self.destroy() * * cdef Uint32 format_from_depth(int depth): # <<<<<<<<<<<<<< @@ -8066,7 +8124,7 @@ static Uint32 __pyx_f_6pygame_5_sdl2_5video_format_from_depth(int __pyx_v_depth) int __pyx_clineno = 0; __Pyx_RefNannySetupContext("format_from_depth", 0); - /* "pygame/_sdl2/video.pyx":522 + /* "pygame/_sdl2/video.pyx":524 * cdef Uint32 format_from_depth(int depth): * cdef Uint32 Rmask, Gmask, Bmask, Amask * if depth == 16: # <<<<<<<<<<<<<< @@ -8076,7 +8134,7 @@ static Uint32 __pyx_f_6pygame_5_sdl2_5video_format_from_depth(int __pyx_v_depth) switch (__pyx_v_depth) { case 16: - /* "pygame/_sdl2/video.pyx":523 + /* "pygame/_sdl2/video.pyx":525 * cdef Uint32 Rmask, Gmask, Bmask, Amask * if depth == 16: * Rmask = 0xF << 8 # <<<<<<<<<<<<<< @@ -8085,7 +8143,7 @@ static Uint32 __pyx_f_6pygame_5_sdl2_5video_format_from_depth(int __pyx_v_depth) */ __pyx_v_Rmask = 0xF00; - /* "pygame/_sdl2/video.pyx":524 + /* "pygame/_sdl2/video.pyx":526 * if depth == 16: * Rmask = 0xF << 8 * Gmask = 0xF << 4 # <<<<<<<<<<<<<< @@ -8094,7 +8152,7 @@ static Uint32 __pyx_f_6pygame_5_sdl2_5video_format_from_depth(int __pyx_v_depth) */ __pyx_v_Gmask = 0xF0; - /* "pygame/_sdl2/video.pyx":525 + /* "pygame/_sdl2/video.pyx":527 * Rmask = 0xF << 8 * Gmask = 0xF << 4 * Bmask = 0xF # <<<<<<<<<<<<<< @@ -8103,7 +8161,7 @@ static Uint32 __pyx_f_6pygame_5_sdl2_5video_format_from_depth(int __pyx_v_depth) */ __pyx_v_Bmask = 0xF; - /* "pygame/_sdl2/video.pyx":526 + /* "pygame/_sdl2/video.pyx":528 * Gmask = 0xF << 4 * Bmask = 0xF * Amask = 0xF << 12 # <<<<<<<<<<<<<< @@ -8112,7 +8170,7 @@ static Uint32 __pyx_f_6pygame_5_sdl2_5video_format_from_depth(int __pyx_v_depth) */ __pyx_v_Amask = 0xF000; - /* "pygame/_sdl2/video.pyx":522 + /* "pygame/_sdl2/video.pyx":524 * cdef Uint32 format_from_depth(int depth): * cdef Uint32 Rmask, Gmask, Bmask, Amask * if depth == 16: # <<<<<<<<<<<<<< @@ -8122,7 +8180,7 @@ static Uint32 __pyx_f_6pygame_5_sdl2_5video_format_from_depth(int __pyx_v_depth) break; case 0: - /* "pygame/_sdl2/video.pyx":527 + /* "pygame/_sdl2/video.pyx":529 * Bmask = 0xF * Amask = 0xF << 12 * elif depth in (0, 32): # <<<<<<<<<<<<<< @@ -8131,7 +8189,7 @@ static Uint32 __pyx_f_6pygame_5_sdl2_5video_format_from_depth(int __pyx_v_depth) */ case 32: - /* "pygame/_sdl2/video.pyx":528 + /* "pygame/_sdl2/video.pyx":530 * Amask = 0xF << 12 * elif depth in (0, 32): * Rmask = 0xFF << 16 # <<<<<<<<<<<<<< @@ -8140,7 +8198,7 @@ static Uint32 __pyx_f_6pygame_5_sdl2_5video_format_from_depth(int __pyx_v_depth) */ __pyx_v_Rmask = 0xFF0000; - /* "pygame/_sdl2/video.pyx":529 + /* "pygame/_sdl2/video.pyx":531 * elif depth in (0, 32): * Rmask = 0xFF << 16 * Gmask = 0xFF << 8 # <<<<<<<<<<<<<< @@ -8149,7 +8207,7 @@ static Uint32 __pyx_f_6pygame_5_sdl2_5video_format_from_depth(int __pyx_v_depth) */ __pyx_v_Gmask = 0xFF00; - /* "pygame/_sdl2/video.pyx":530 + /* "pygame/_sdl2/video.pyx":532 * Rmask = 0xFF << 16 * Gmask = 0xFF << 8 * Bmask = 0xFF # <<<<<<<<<<<<<< @@ -8158,7 +8216,7 @@ static Uint32 __pyx_f_6pygame_5_sdl2_5video_format_from_depth(int __pyx_v_depth) */ __pyx_v_Bmask = 0xFF; - /* "pygame/_sdl2/video.pyx":531 + /* "pygame/_sdl2/video.pyx":533 * Gmask = 0xFF << 8 * Bmask = 0xFF * Amask = 0xFF << 24 # <<<<<<<<<<<<<< @@ -8167,7 +8225,7 @@ static Uint32 __pyx_f_6pygame_5_sdl2_5video_format_from_depth(int __pyx_v_depth) */ __pyx_v_Amask = 0xFF000000; - /* "pygame/_sdl2/video.pyx":527 + /* "pygame/_sdl2/video.pyx":529 * Bmask = 0xF * Amask = 0xF << 12 * elif depth in (0, 32): # <<<<<<<<<<<<<< @@ -8177,22 +8235,22 @@ static Uint32 __pyx_f_6pygame_5_sdl2_5video_format_from_depth(int __pyx_v_depth) break; default: - /* "pygame/_sdl2/video.pyx":533 + /* "pygame/_sdl2/video.pyx":535 * 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__9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 533, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 535, __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, 533, __pyx_L1_error) + __PYX_ERR(0, 535, __pyx_L1_error) break; } - /* "pygame/_sdl2/video.pyx":534 + /* "pygame/_sdl2/video.pyx":536 * else: * raise ValueError("no standard masks exist for given bitdepth with alpha") * return SDL_MasksToPixelFormatEnum(depth, # <<<<<<<<<<<<<< @@ -8202,7 +8260,7 @@ static Uint32 __pyx_f_6pygame_5_sdl2_5video_format_from_depth(int __pyx_v_depth) __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":520 + /* "pygame/_sdl2/video.pyx":522 * self.destroy() * * cdef Uint32 format_from_depth(int depth): # <<<<<<<<<<<<<< @@ -8220,7 +8278,7 @@ static Uint32 __pyx_f_6pygame_5_sdl2_5video_format_from_depth(int __pyx_v_depth) return __pyx_r; } -/* "pygame/_sdl2/video.pyx":539 +/* "pygame/_sdl2/video.pyx":541 * * cdef class Texture: * def __cinit__(self): # <<<<<<<<<<<<<< @@ -8255,7 +8313,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_7Texture___cinit__(struct __pyx_obj_6p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 0); - /* "pygame/_sdl2/video.pyx":540 + /* "pygame/_sdl2/video.pyx":542 * cdef class Texture: * def __cinit__(self): * cdef Uint8[4] defaultColor = [255, 255, 255, 255] # <<<<<<<<<<<<<< @@ -8268,23 +8326,23 @@ static int __pyx_pf_6pygame_5_sdl2_5video_7Texture___cinit__(struct __pyx_obj_6p __pyx_t_1[3] = 0xFF; memcpy(&(__pyx_v_defaultColor[0]), __pyx_t_1, sizeof(__pyx_v_defaultColor[0]) * (4)); - /* "pygame/_sdl2/video.pyx":541 + /* "pygame/_sdl2/video.pyx":543 * 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, 541, __pyx_L1_error) + __pyx_t_2 = pgColor_NewLength(__pyx_v_defaultColor, 3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 543, __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, 541, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6pygame_5_sdl2_5video_Color))))) __PYX_ERR(0, 543, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__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":539 + /* "pygame/_sdl2/video.pyx":541 * * cdef class Texture: * def __cinit__(self): # <<<<<<<<<<<<<< @@ -8304,7 +8362,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_7Texture___cinit__(struct __pyx_obj_6p return __pyx_r; } -/* "pygame/_sdl2/video.pyx":543 +/* "pygame/_sdl2/video.pyx":545 * self._color = pgColor_NewLength(defaultColor, 3) * * def __init__(self, # <<<<<<<<<<<<<< @@ -8336,7 +8394,7 @@ static int __pyx_pw_6pygame_5_sdl2_5video_7Texture_3__init__(PyObject *__pyx_v_s static 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,&__pyx_n_s_scale_quality,0}; PyObject* values[7] = {0,0,0,0,0,0,0}; - /* "pygame/_sdl2/video.pyx":546 + /* "pygame/_sdl2/video.pyx":548 * Renderer renderer, * size, int depth=0, * static=False, streaming=False, # <<<<<<<<<<<<<< @@ -8346,7 +8404,7 @@ static int __pyx_pw_6pygame_5_sdl2_5video_7Texture_3__init__(PyObject *__pyx_v_s values[3] = ((PyObject *)Py_False); values[4] = ((PyObject *)Py_False); - /* "pygame/_sdl2/video.pyx":547 + /* "pygame/_sdl2/video.pyx":549 * size, int depth=0, * static=False, streaming=False, * target=False, scale_quality=None): # <<<<<<<<<<<<<< @@ -8385,7 +8443,7 @@ static int __pyx_pw_6pygame_5_sdl2_5video_7Texture_3__init__(PyObject *__pyx_v_s case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_size)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 7, 1); __PYX_ERR(0, 543, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 7, 1); __PYX_ERR(0, 545, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -8419,7 +8477,7 @@ static int __pyx_pw_6pygame_5_sdl2_5video_7Texture_3__init__(PyObject *__pyx_v_s } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 543, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 545, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -8442,7 +8500,7 @@ static int __pyx_pw_6pygame_5_sdl2_5video_7Texture_3__init__(PyObject *__pyx_v_s __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, 545, __pyx_L3_error) + __pyx_v_depth = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_depth == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 547, __pyx_L3_error) } else { __pyx_v_depth = ((int)0); } @@ -8453,16 +8511,16 @@ static int __pyx_pw_6pygame_5_sdl2_5video_7Texture_3__init__(PyObject *__pyx_v_s } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 543, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 545, __pyx_L3_error) __pyx_L3_error:; __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, 544, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_renderer), __pyx_ptype_6pygame_5_sdl2_5video_Renderer, 1, "renderer", 0))) __PYX_ERR(0, 546, __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, __pyx_v_scale_quality); - /* "pygame/_sdl2/video.pyx":543 + /* "pygame/_sdl2/video.pyx":545 * self._color = pgColor_NewLength(defaultColor, 3) * * def __init__(self, # <<<<<<<<<<<<<< @@ -8507,7 +8565,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_7Texture_2__init__(struct __pyx_obj_6p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "pygame/_sdl2/video.pyx":592 + /* "pygame/_sdl2/video.pyx":594 * # TODO: masks * cdef Uint32 format * try: # <<<<<<<<<<<<<< @@ -8518,7 +8576,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_7Texture_2__init__(struct __pyx_obj_6p (void)__pyx_t_1; (void)__pyx_t_2; (void)__pyx_t_3; /* mark used */ /*try:*/ { - /* "pygame/_sdl2/video.pyx":593 + /* "pygame/_sdl2/video.pyx":595 * cdef Uint32 format * try: * format = format_from_depth(depth) # <<<<<<<<<<<<<< @@ -8527,7 +8585,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_7Texture_2__init__(struct __pyx_obj_6p */ __pyx_v_format = __pyx_f_6pygame_5_sdl2_5video_format_from_depth(__pyx_v_depth); - /* "pygame/_sdl2/video.pyx":592 + /* "pygame/_sdl2/video.pyx":594 * # TODO: masks * cdef Uint32 format * try: # <<<<<<<<<<<<<< @@ -8537,31 +8595,31 @@ static int __pyx_pf_6pygame_5_sdl2_5video_7Texture_2__init__(struct __pyx_obj_6p } } - /* "pygame/_sdl2/video.pyx":598 + /* "pygame/_sdl2/video.pyx":600 * * cdef int width, height * if len(size) != 2: # <<<<<<<<<<<<<< * raise ValueError('size must have two elements') * width, height = size[0], size[1] */ - __pyx_t_4 = PyObject_Length(__pyx_v_size); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 598, __pyx_L1_error) + __pyx_t_4 = PyObject_Length(__pyx_v_size); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 600, __pyx_L1_error) __pyx_t_5 = ((__pyx_t_4 != 2) != 0); if (unlikely(__pyx_t_5)) { - /* "pygame/_sdl2/video.pyx":599 + /* "pygame/_sdl2/video.pyx":601 * 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_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 599, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 601, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __PYX_ERR(0, 599, __pyx_L1_error) + __PYX_ERR(0, 601, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":598 + /* "pygame/_sdl2/video.pyx":600 * * cdef int width, height * if len(size) != 2: # <<<<<<<<<<<<<< @@ -8570,25 +8628,25 @@ static int __pyx_pf_6pygame_5_sdl2_5video_7Texture_2__init__(struct __pyx_obj_6p */ } - /* "pygame/_sdl2/video.pyx":600 + /* "pygame/_sdl2/video.pyx":602 * 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_6 = __Pyx_GetItemInt(__pyx_v_size, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 600, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_size, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 602, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 600, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 602, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_size, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 600, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_size, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 602, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 600, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 602, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_width = __pyx_t_7; __pyx_v_height = __pyx_t_8; - /* "pygame/_sdl2/video.pyx":601 + /* "pygame/_sdl2/video.pyx":603 * raise ValueError('size must have two elements') * width, height = size[0], size[1] * if width <= 0 or height <= 0: # <<<<<<<<<<<<<< @@ -8606,20 +8664,20 @@ static int __pyx_pf_6pygame_5_sdl2_5video_7Texture_2__init__(struct __pyx_obj_6p __pyx_L11_bool_binop_done:; if (unlikely(__pyx_t_5)) { - /* "pygame/_sdl2/video.pyx":602 + /* "pygame/_sdl2/video.pyx":604 * 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_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 602, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 604, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __PYX_ERR(0, 602, __pyx_L1_error) + __PYX_ERR(0, 604, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":601 + /* "pygame/_sdl2/video.pyx":603 * raise ValueError('size must have two elements') * width, height = size[0], size[1] * if width <= 0 or height <= 0: # <<<<<<<<<<<<<< @@ -8628,48 +8686,48 @@ static int __pyx_pf_6pygame_5_sdl2_5video_7Texture_2__init__(struct __pyx_obj_6p */ } - /* "pygame/_sdl2/video.pyx":605 + /* "pygame/_sdl2/video.pyx":607 * * cdef int access * if static: # <<<<<<<<<<<<<< * if streaming or target: * raise ValueError('only one of static, streaming, or target can be true') */ - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_static); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 605, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_static); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 607, __pyx_L1_error) if (__pyx_t_5) { - /* "pygame/_sdl2/video.pyx":606 + /* "pygame/_sdl2/video.pyx":608 * 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_9 = __Pyx_PyObject_IsTrue(__pyx_v_streaming); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 606, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_streaming); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 608, __pyx_L1_error) if (!__pyx_t_9) { } else { __pyx_t_5 = __pyx_t_9; goto __pyx_L15_bool_binop_done; } - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_target); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 606, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_target); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 608, __pyx_L1_error) __pyx_t_5 = __pyx_t_9; __pyx_L15_bool_binop_done:; if (unlikely(__pyx_t_5)) { - /* "pygame/_sdl2/video.pyx":607 + /* "pygame/_sdl2/video.pyx":609 * 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_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 607, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 609, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __PYX_ERR(0, 607, __pyx_L1_error) + __PYX_ERR(0, 609, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":606 + /* "pygame/_sdl2/video.pyx":608 * cdef int access * if static: * if streaming or target: # <<<<<<<<<<<<<< @@ -8678,7 +8736,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_7Texture_2__init__(struct __pyx_obj_6p */ } - /* "pygame/_sdl2/video.pyx":608 + /* "pygame/_sdl2/video.pyx":610 * if streaming or target: * raise ValueError('only one of static, streaming, or target can be true') * access = _SDL_TEXTUREACCESS_STATIC # <<<<<<<<<<<<<< @@ -8687,7 +8745,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_7Texture_2__init__(struct __pyx_obj_6p */ __pyx_v_access = SDL_TEXTUREACCESS_STATIC; - /* "pygame/_sdl2/video.pyx":605 + /* "pygame/_sdl2/video.pyx":607 * * cdef int access * if static: # <<<<<<<<<<<<<< @@ -8697,48 +8755,48 @@ static int __pyx_pf_6pygame_5_sdl2_5video_7Texture_2__init__(struct __pyx_obj_6p goto __pyx_L13; } - /* "pygame/_sdl2/video.pyx":609 + /* "pygame/_sdl2/video.pyx":611 * 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_5 = __Pyx_PyObject_IsTrue(__pyx_v_streaming); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 609, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_streaming); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 611, __pyx_L1_error) if (__pyx_t_5) { - /* "pygame/_sdl2/video.pyx":610 + /* "pygame/_sdl2/video.pyx":612 * 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_9 = __Pyx_PyObject_IsTrue(__pyx_v_static); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 610, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_static); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 612, __pyx_L1_error) if (!__pyx_t_9) { } else { __pyx_t_5 = __pyx_t_9; goto __pyx_L18_bool_binop_done; } - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_target); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 610, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_target); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 612, __pyx_L1_error) __pyx_t_5 = __pyx_t_9; __pyx_L18_bool_binop_done:; if (unlikely(__pyx_t_5)) { - /* "pygame/_sdl2/video.pyx":611 + /* "pygame/_sdl2/video.pyx":613 * 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_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 611, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 613, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __PYX_ERR(0, 611, __pyx_L1_error) + __PYX_ERR(0, 613, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":610 + /* "pygame/_sdl2/video.pyx":612 * access = _SDL_TEXTUREACCESS_STATIC * elif streaming: * if static or target: # <<<<<<<<<<<<<< @@ -8747,7 +8805,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_7Texture_2__init__(struct __pyx_obj_6p */ } - /* "pygame/_sdl2/video.pyx":612 + /* "pygame/_sdl2/video.pyx":614 * if static or target: * raise ValueError('only one of static, streaming, or target can be true') * access = _SDL_TEXTUREACCESS_STREAMING # <<<<<<<<<<<<<< @@ -8756,7 +8814,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_7Texture_2__init__(struct __pyx_obj_6p */ __pyx_v_access = SDL_TEXTUREACCESS_STREAMING; - /* "pygame/_sdl2/video.pyx":609 + /* "pygame/_sdl2/video.pyx":611 * raise ValueError('only one of static, streaming, or target can be true') * access = _SDL_TEXTUREACCESS_STATIC * elif streaming: # <<<<<<<<<<<<<< @@ -8766,48 +8824,48 @@ static int __pyx_pf_6pygame_5_sdl2_5video_7Texture_2__init__(struct __pyx_obj_6p goto __pyx_L13; } - /* "pygame/_sdl2/video.pyx":613 + /* "pygame/_sdl2/video.pyx":615 * 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_5 = __Pyx_PyObject_IsTrue(__pyx_v_target); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 613, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_target); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 615, __pyx_L1_error) if (__pyx_t_5) { - /* "pygame/_sdl2/video.pyx":614 + /* "pygame/_sdl2/video.pyx":616 * 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_9 = __Pyx_PyObject_IsTrue(__pyx_v_streaming); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 614, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_streaming); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 616, __pyx_L1_error) if (!__pyx_t_9) { } else { __pyx_t_5 = __pyx_t_9; goto __pyx_L21_bool_binop_done; } - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_static); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 614, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_static); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 616, __pyx_L1_error) __pyx_t_5 = __pyx_t_9; __pyx_L21_bool_binop_done:; if (unlikely(__pyx_t_5)) { - /* "pygame/_sdl2/video.pyx":615 + /* "pygame/_sdl2/video.pyx":617 * 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_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 615, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 617, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __PYX_ERR(0, 615, __pyx_L1_error) + __PYX_ERR(0, 617, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":614 + /* "pygame/_sdl2/video.pyx":616 * access = _SDL_TEXTUREACCESS_STREAMING * elif target: * if streaming or static: # <<<<<<<<<<<<<< @@ -8816,7 +8874,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_7Texture_2__init__(struct __pyx_obj_6p */ } - /* "pygame/_sdl2/video.pyx":616 + /* "pygame/_sdl2/video.pyx":618 * if streaming or static: * raise ValueError('only one of static, streaming, or target can be true') * access = _SDL_TEXTUREACCESS_TARGET # <<<<<<<<<<<<<< @@ -8825,7 +8883,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_7Texture_2__init__(struct __pyx_obj_6p */ __pyx_v_access = SDL_TEXTUREACCESS_TARGET; - /* "pygame/_sdl2/video.pyx":613 + /* "pygame/_sdl2/video.pyx":615 * raise ValueError('only one of static, streaming, or target can be true') * access = _SDL_TEXTUREACCESS_STREAMING * elif target: # <<<<<<<<<<<<<< @@ -8835,7 +8893,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_7Texture_2__init__(struct __pyx_obj_6p goto __pyx_L13; } - /* "pygame/_sdl2/video.pyx":619 + /* "pygame/_sdl2/video.pyx":621 * else: * # Create static texture by default. * access = _SDL_TEXTUREACCESS_STATIC # <<<<<<<<<<<<<< @@ -8847,7 +8905,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_7Texture_2__init__(struct __pyx_obj_6p } __pyx_L13:; - /* "pygame/_sdl2/video.pyx":621 + /* "pygame/_sdl2/video.pyx":623 * access = _SDL_TEXTUREACCESS_STATIC * * self.renderer = renderer # <<<<<<<<<<<<<< @@ -8860,7 +8918,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_7Texture_2__init__(struct __pyx_obj_6p __Pyx_DECREF(((PyObject *)__pyx_v_self->renderer)); __pyx_v_self->renderer = __pyx_v_renderer; - /* "pygame/_sdl2/video.pyx":622 + /* "pygame/_sdl2/video.pyx":624 * * self.renderer = renderer * cdef SDL_Renderer* _renderer = renderer._renderer # <<<<<<<<<<<<<< @@ -8870,7 +8928,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_7Texture_2__init__(struct __pyx_obj_6p __pyx_t_10 = __pyx_v_renderer->_renderer; __pyx_v__renderer = __pyx_t_10; - /* "pygame/_sdl2/video.pyx":623 + /* "pygame/_sdl2/video.pyx":625 * self.renderer = renderer * cdef SDL_Renderer* _renderer = renderer._renderer * self._tex = SDL_CreateTexture(_renderer, # <<<<<<<<<<<<<< @@ -8879,7 +8937,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_7Texture_2__init__(struct __pyx_obj_6p */ __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":627 + /* "pygame/_sdl2/video.pyx":629 * access, * width, height) * if not self._tex: # <<<<<<<<<<<<<< @@ -8889,14 +8947,14 @@ static int __pyx_pf_6pygame_5_sdl2_5video_7Texture_2__init__(struct __pyx_obj_6p __pyx_t_5 = ((!(__pyx_v_self->_tex != 0)) != 0); if (unlikely(__pyx_t_5)) { - /* "pygame/_sdl2/video.pyx":628 + /* "pygame/_sdl2/video.pyx":630 * width, height) * if not self._tex: * raise error() # <<<<<<<<<<<<<< * * if not scale_quality is None: */ - __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_error); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 628, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_error); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 630, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_12 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) { @@ -8910,14 +8968,14 @@ static int __pyx_pf_6pygame_5_sdl2_5video_7Texture_2__init__(struct __pyx_obj_6p } __pyx_t_6 = (__pyx_t_12) ? __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_12) : __Pyx_PyObject_CallNoArg(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 628, __pyx_L1_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 630, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __PYX_ERR(0, 628, __pyx_L1_error) + __PYX_ERR(0, 630, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":627 + /* "pygame/_sdl2/video.pyx":629 * access, * width, height) * if not self._tex: # <<<<<<<<<<<<<< @@ -8926,7 +8984,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_7Texture_2__init__(struct __pyx_obj_6p */ } - /* "pygame/_sdl2/video.pyx":630 + /* "pygame/_sdl2/video.pyx":632 * raise error() * * if not scale_quality is None: # <<<<<<<<<<<<<< @@ -8937,7 +8995,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_7Texture_2__init__(struct __pyx_obj_6p __pyx_t_9 = (__pyx_t_5 != 0); if (__pyx_t_9) { - /* "pygame/_sdl2/video.pyx":631 + /* "pygame/_sdl2/video.pyx":633 * * if not scale_quality is None: * if SDL_VERSION_ATLEAST(2,0,12): # <<<<<<<<<<<<<< @@ -8947,17 +9005,17 @@ static int __pyx_pf_6pygame_5_sdl2_5video_7Texture_2__init__(struct __pyx_obj_6p __pyx_t_9 = (SDL_VERSION_ATLEAST(2, 0, 12) != 0); if (__pyx_t_9) { - /* "pygame/_sdl2/video.pyx":632 + /* "pygame/_sdl2/video.pyx":634 * if not scale_quality is None: * if SDL_VERSION_ATLEAST(2,0,12): * SDL_SetTextureScaleMode(self._tex,scale_quality) # <<<<<<<<<<<<<< * else: * SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY,{ */ - __pyx_t_13 = ((_pgsdlScaleMode)__Pyx_PyInt_As__pgsdlScaleMode(__pyx_v_scale_quality)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 632, __pyx_L1_error) + __pyx_t_13 = ((_pgsdlScaleMode)__Pyx_PyInt_As__pgsdlScaleMode(__pyx_v_scale_quality)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 634, __pyx_L1_error) (void)(SDL_SetTextureScaleMode(__pyx_v_self->_tex, __pyx_t_13)); - /* "pygame/_sdl2/video.pyx":631 + /* "pygame/_sdl2/video.pyx":633 * * if not scale_quality is None: * if SDL_VERSION_ATLEAST(2,0,12): # <<<<<<<<<<<<<< @@ -8967,7 +9025,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_7Texture_2__init__(struct __pyx_obj_6p goto __pyx_L25; } - /* "pygame/_sdl2/video.pyx":634 + /* "pygame/_sdl2/video.pyx":636 * SDL_SetTextureScaleMode(self._tex,scale_quality) * else: * SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY,{ # <<<<<<<<<<<<<< @@ -8976,32 +9034,32 @@ static int __pyx_pf_6pygame_5_sdl2_5video_7Texture_2__init__(struct __pyx_obj_6p */ /*else*/ { - /* "pygame/_sdl2/video.pyx":635 + /* "pygame/_sdl2/video.pyx":637 * else: * SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY,{ * 0: b'nearest', # <<<<<<<<<<<<<< * 1: b'linear', * 2: b'best' */ - __pyx_t_6 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 635, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 637, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (PyDict_SetItem(__pyx_t_6, __pyx_int_0, __pyx_n_b_nearest) < 0) __PYX_ERR(0, 635, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_6, __pyx_int_1, __pyx_n_b_linear) < 0) __PYX_ERR(0, 635, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_6, __pyx_int_2, __pyx_n_b_best) < 0) __PYX_ERR(0, 635, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_int_0, __pyx_n_b_nearest) < 0) __PYX_ERR(0, 637, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_int_1, __pyx_n_b_linear) < 0) __PYX_ERR(0, 637, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_int_2, __pyx_n_b_best) < 0) __PYX_ERR(0, 637, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":638 + /* "pygame/_sdl2/video.pyx":640 * 1: b'linear', * 2: b'best' * }[scale_quality]) # <<<<<<<<<<<<<< * * self.width, self.height = width, height */ - __pyx_t_11 = __Pyx_PyDict_GetItem(__pyx_t_6, __pyx_v_scale_quality); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 638, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyDict_GetItem(__pyx_t_6, __pyx_v_scale_quality); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 640, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_14 = __Pyx_PyObject_AsString(__pyx_t_11); if (unlikely((!__pyx_t_14) && PyErr_Occurred())) __PYX_ERR(0, 638, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyObject_AsString(__pyx_t_11); if (unlikely((!__pyx_t_14) && PyErr_Occurred())) __PYX_ERR(0, 640, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":634 + /* "pygame/_sdl2/video.pyx":636 * SDL_SetTextureScaleMode(self._tex,scale_quality) * else: * SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY,{ # <<<<<<<<<<<<<< @@ -9013,7 +9071,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_7Texture_2__init__(struct __pyx_obj_6p } __pyx_L25:; - /* "pygame/_sdl2/video.pyx":630 + /* "pygame/_sdl2/video.pyx":632 * raise error() * * if not scale_quality is None: # <<<<<<<<<<<<<< @@ -9022,7 +9080,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_7Texture_2__init__(struct __pyx_obj_6p */ } - /* "pygame/_sdl2/video.pyx":640 + /* "pygame/_sdl2/video.pyx":642 * }[scale_quality]) * * self.width, self.height = width, height # <<<<<<<<<<<<<< @@ -9034,7 +9092,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_7Texture_2__init__(struct __pyx_obj_6p __pyx_v_self->width = __pyx_t_8; __pyx_v_self->height = __pyx_t_7; - /* "pygame/_sdl2/video.pyx":543 + /* "pygame/_sdl2/video.pyx":545 * self._color = pgColor_NewLength(defaultColor, 3) * * def __init__(self, # <<<<<<<<<<<<<< @@ -9057,7 +9115,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_7Texture_2__init__(struct __pyx_obj_6p return __pyx_r; } -/* "pygame/_sdl2/video.pyx":643 +/* "pygame/_sdl2/video.pyx":645 * * @staticmethod * def from_surface(Renderer renderer, surface): # <<<<<<<<<<<<<< @@ -9101,11 +9159,11 @@ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7Texture_5from_surface(CYTHON_UN case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_surface)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("from_surface", 1, 2, 2, 1); __PYX_ERR(0, 643, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("from_surface", 1, 2, 2, 1); __PYX_ERR(0, 645, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_surface") < 0)) __PYX_ERR(0, 643, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_surface") < 0)) __PYX_ERR(0, 645, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -9118,13 +9176,13 @@ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7Texture_5from_surface(CYTHON_UN } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("from_surface", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 643, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("from_surface", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 645, __pyx_L3_error) __pyx_L3_error:; __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, 643, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_renderer), __pyx_ptype_6pygame_5_sdl2_5video_Renderer, 1, "renderer", 0))) __PYX_ERR(0, 645, __pyx_L1_error) __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_7Texture_4from_surface(__pyx_v_renderer, __pyx_v_surface); /* function exit code */ @@ -9153,7 +9211,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_4from_surface(struct __ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("from_surface", 0); - /* "pygame/_sdl2/video.pyx":650 + /* "pygame/_sdl2/video.pyx":652 * """ * # https://wiki.libsdl.org/SDL_CreateTextureFromSurface * if not pgSurface_Check(surface): # <<<<<<<<<<<<<< @@ -9163,20 +9221,20 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_4from_surface(struct __ __pyx_t_1 = ((!(pgSurface_Check(__pyx_v_surface) != 0)) != 0); if (unlikely(__pyx_t_1)) { - /* "pygame/_sdl2/video.pyx":651 + /* "pygame/_sdl2/video.pyx":653 * # 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__13, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 651, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 653, __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, 651, __pyx_L1_error) + __PYX_ERR(0, 653, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":650 + /* "pygame/_sdl2/video.pyx":652 * """ * # https://wiki.libsdl.org/SDL_CreateTextureFromSurface * if not pgSurface_Check(surface): # <<<<<<<<<<<<<< @@ -9185,19 +9243,19 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_4from_surface(struct __ */ } - /* "pygame/_sdl2/video.pyx":652 + /* "pygame/_sdl2/video.pyx":654 * 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, 652, __pyx_L1_error) + __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, 654, __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":653 + /* "pygame/_sdl2/video.pyx":655 * raise TypeError('2nd argument must be a surface') * cdef Texture self = Texture.__new__(Texture) * self.renderer = renderer # <<<<<<<<<<<<<< @@ -9210,7 +9268,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_4from_surface(struct __ __Pyx_DECREF(((PyObject *)__pyx_v_self->renderer)); __pyx_v_self->renderer = __pyx_v_renderer; - /* "pygame/_sdl2/video.pyx":654 + /* "pygame/_sdl2/video.pyx":656 * cdef Texture self = Texture.__new__(Texture) * self.renderer = renderer * cdef SDL_Renderer* _renderer = renderer._renderer # <<<<<<<<<<<<<< @@ -9220,7 +9278,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_4from_surface(struct __ __pyx_t_3 = __pyx_v_renderer->_renderer; __pyx_v__renderer = __pyx_t_3; - /* "pygame/_sdl2/video.pyx":655 + /* "pygame/_sdl2/video.pyx":657 * self.renderer = renderer * cdef SDL_Renderer* _renderer = renderer._renderer * cdef SDL_Surface *surf_ptr = pgSurface_AsSurface(surface) # <<<<<<<<<<<<<< @@ -9229,7 +9287,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_4from_surface(struct __ */ __pyx_v_surf_ptr = pgSurface_AsSurface(__pyx_v_surface); - /* "pygame/_sdl2/video.pyx":656 + /* "pygame/_sdl2/video.pyx":658 * cdef SDL_Renderer* _renderer = renderer._renderer * cdef SDL_Surface *surf_ptr = pgSurface_AsSurface(surface) * self._tex = SDL_CreateTextureFromSurface(_renderer, # <<<<<<<<<<<<<< @@ -9238,7 +9296,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_4from_surface(struct __ */ __pyx_v_self->_tex = SDL_CreateTextureFromSurface(__pyx_v__renderer, __pyx_v_surf_ptr); - /* "pygame/_sdl2/video.pyx":658 + /* "pygame/_sdl2/video.pyx":660 * self._tex = SDL_CreateTextureFromSurface(_renderer, * surf_ptr) * if not self._tex: # <<<<<<<<<<<<<< @@ -9248,14 +9306,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_4from_surface(struct __ __pyx_t_1 = ((!(__pyx_v_self->_tex != 0)) != 0); if (unlikely(__pyx_t_1)) { - /* "pygame/_sdl2/video.pyx":659 + /* "pygame/_sdl2/video.pyx":661 * 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, 659, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_error); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 661, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { @@ -9269,14 +9327,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_4from_surface(struct __ } __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 659, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 661, __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, 659, __pyx_L1_error) + __PYX_ERR(0, 661, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":658 + /* "pygame/_sdl2/video.pyx":660 * self._tex = SDL_CreateTextureFromSurface(_renderer, * surf_ptr) * if not self._tex: # <<<<<<<<<<<<<< @@ -9285,14 +9343,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_4from_surface(struct __ */ } - /* "pygame/_sdl2/video.pyx":660 + /* "pygame/_sdl2/video.pyx":662 * 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, 660, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_surface, __pyx_n_s_get_width); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 662, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -9306,21 +9364,21 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_4from_surface(struct __ } __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 660, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 662, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 660, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 662, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_self->width = __pyx_t_6; - /* "pygame/_sdl2/video.pyx":661 + /* "pygame/_sdl2/video.pyx":663 * 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, 661, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_surface, __pyx_n_s_get_height); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 663, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -9334,14 +9392,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_4from_surface(struct __ } __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 661, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 663, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 661, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 663, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_self->height = __pyx_t_6; - /* "pygame/_sdl2/video.pyx":662 + /* "pygame/_sdl2/video.pyx":664 * self.width = surface.get_width() * self.height = surface.get_height() * return self # <<<<<<<<<<<<<< @@ -9353,7 +9411,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_4from_surface(struct __ __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "pygame/_sdl2/video.pyx":643 + /* "pygame/_sdl2/video.pyx":645 * * @staticmethod * def from_surface(Renderer renderer, surface): # <<<<<<<<<<<<<< @@ -9375,7 +9433,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_4from_surface(struct __ return __pyx_r; } -/* "pygame/_sdl2/video.pyx":664 +/* "pygame/_sdl2/video.pyx":666 * return self * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -9399,7 +9457,7 @@ static void __pyx_pf_6pygame_5_sdl2_5video_7Texture_6__dealloc__(struct __pyx_ob int __pyx_t_1; __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "pygame/_sdl2/video.pyx":665 + /* "pygame/_sdl2/video.pyx":667 * * def __dealloc__(self): * if self._tex: # <<<<<<<<<<<<<< @@ -9409,7 +9467,7 @@ static void __pyx_pf_6pygame_5_sdl2_5video_7Texture_6__dealloc__(struct __pyx_ob __pyx_t_1 = (__pyx_v_self->_tex != 0); if (__pyx_t_1) { - /* "pygame/_sdl2/video.pyx":666 + /* "pygame/_sdl2/video.pyx":668 * def __dealloc__(self): * if self._tex: * SDL_DestroyTexture(self._tex) # <<<<<<<<<<<<<< @@ -9418,7 +9476,7 @@ static void __pyx_pf_6pygame_5_sdl2_5video_7Texture_6__dealloc__(struct __pyx_ob */ SDL_DestroyTexture(__pyx_v_self->_tex); - /* "pygame/_sdl2/video.pyx":665 + /* "pygame/_sdl2/video.pyx":667 * * def __dealloc__(self): * if self._tex: # <<<<<<<<<<<<<< @@ -9427,7 +9485,7 @@ static void __pyx_pf_6pygame_5_sdl2_5video_7Texture_6__dealloc__(struct __pyx_ob */ } - /* "pygame/_sdl2/video.pyx":664 + /* "pygame/_sdl2/video.pyx":666 * return self * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -9439,7 +9497,7 @@ static void __pyx_pf_6pygame_5_sdl2_5video_7Texture_6__dealloc__(struct __pyx_ob __Pyx_RefNannyFinishContext(); } -/* "pygame/_sdl2/video.pyx":669 +/* "pygame/_sdl2/video.pyx":671 * * @property * def alpha(self): # <<<<<<<<<<<<<< @@ -9474,7 +9532,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_5alpha___get__(struct _ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "pygame/_sdl2/video.pyx":674 + /* "pygame/_sdl2/video.pyx":676 * # https://wiki.libsdl.org/SDL_GetTextureAlphaMod * cdef Uint8 alpha * cdef int res = SDL_GetTextureAlphaMod(self._tex, &alpha) # <<<<<<<<<<<<<< @@ -9483,7 +9541,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_5alpha___get__(struct _ */ __pyx_v_res = SDL_GetTextureAlphaMod(__pyx_v_self->_tex, (&__pyx_v_alpha)); - /* "pygame/_sdl2/video.pyx":675 + /* "pygame/_sdl2/video.pyx":677 * cdef Uint8 alpha * cdef int res = SDL_GetTextureAlphaMod(self._tex, &alpha) * if res < 0: # <<<<<<<<<<<<<< @@ -9493,14 +9551,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_5alpha___get__(struct _ __pyx_t_1 = ((__pyx_v_res < 0) != 0); if (unlikely(__pyx_t_1)) { - /* "pygame/_sdl2/video.pyx":676 + /* "pygame/_sdl2/video.pyx":678 * cdef int 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, 676, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 678, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { @@ -9514,14 +9572,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_5alpha___get__(struct _ } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 676, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 678, __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) + __PYX_ERR(0, 678, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":675 + /* "pygame/_sdl2/video.pyx":677 * cdef Uint8 alpha * cdef int res = SDL_GetTextureAlphaMod(self._tex, &alpha) * if res < 0: # <<<<<<<<<<<<<< @@ -9530,7 +9588,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_5alpha___get__(struct _ */ } - /* "pygame/_sdl2/video.pyx":678 + /* "pygame/_sdl2/video.pyx":680 * raise error() * * return alpha # <<<<<<<<<<<<<< @@ -9538,13 +9596,13 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_5alpha___get__(struct _ * @alpha.setter */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyInt_From_Uint8(__pyx_v_alpha); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 678, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_Uint8(__pyx_v_alpha); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 680, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "pygame/_sdl2/video.pyx":669 + /* "pygame/_sdl2/video.pyx":671 * * @property * def alpha(self): # <<<<<<<<<<<<<< @@ -9565,7 +9623,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_5alpha___get__(struct _ return __pyx_r; } -/* "pygame/_sdl2/video.pyx":681 +/* "pygame/_sdl2/video.pyx":683 * * @alpha.setter * def alpha(self, Uint8 new_value): # <<<<<<<<<<<<<< @@ -9584,7 +9642,7 @@ static int __pyx_pw_6pygame_5_sdl2_5video_7Texture_5alpha_3__set__(PyObject *__p __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); 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, 681, __pyx_L3_error) + __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, 683, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -9612,7 +9670,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_7Texture_5alpha_2__set__(struct __pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - /* "pygame/_sdl2/video.pyx":683 + /* "pygame/_sdl2/video.pyx":685 * def alpha(self, Uint8 new_value): * # https://wiki.libsdl.org/SDL_SetTextureAlphaMod * cdef int res = SDL_SetTextureAlphaMod(self._tex, new_value) # <<<<<<<<<<<<<< @@ -9621,7 +9679,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_7Texture_5alpha_2__set__(struct __pyx_ */ __pyx_v_res = SDL_SetTextureAlphaMod(__pyx_v_self->_tex, __pyx_v_new_value); - /* "pygame/_sdl2/video.pyx":684 + /* "pygame/_sdl2/video.pyx":686 * # https://wiki.libsdl.org/SDL_SetTextureAlphaMod * cdef int res = SDL_SetTextureAlphaMod(self._tex, new_value) * if res < 0: # <<<<<<<<<<<<<< @@ -9631,14 +9689,14 @@ static int __pyx_pf_6pygame_5_sdl2_5video_7Texture_5alpha_2__set__(struct __pyx_ __pyx_t_1 = ((__pyx_v_res < 0) != 0); if (unlikely(__pyx_t_1)) { - /* "pygame/_sdl2/video.pyx":685 + /* "pygame/_sdl2/video.pyx":687 * cdef int 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, 685, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 687, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { @@ -9652,14 +9710,14 @@ static int __pyx_pf_6pygame_5_sdl2_5video_7Texture_5alpha_2__set__(struct __pyx_ } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 685, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 687, __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, 685, __pyx_L1_error) + __PYX_ERR(0, 687, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":684 + /* "pygame/_sdl2/video.pyx":686 * # https://wiki.libsdl.org/SDL_SetTextureAlphaMod * cdef int res = SDL_SetTextureAlphaMod(self._tex, new_value) * if res < 0: # <<<<<<<<<<<<<< @@ -9668,7 +9726,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_7Texture_5alpha_2__set__(struct __pyx_ */ } - /* "pygame/_sdl2/video.pyx":681 + /* "pygame/_sdl2/video.pyx":683 * * @alpha.setter * def alpha(self, Uint8 new_value): # <<<<<<<<<<<<<< @@ -9690,7 +9748,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_7Texture_5alpha_2__set__(struct __pyx_ return __pyx_r; } -/* "pygame/_sdl2/video.pyx":688 +/* "pygame/_sdl2/video.pyx":690 * * @property * def blend_mode(self): # <<<<<<<<<<<<<< @@ -9725,7 +9783,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_10blend_mode___get__(st int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "pygame/_sdl2/video.pyx":696 + /* "pygame/_sdl2/video.pyx":698 * # https://wiki.libsdl.org/SDL_GetTextureBlendMode * cdef SDL_BlendMode blendMode * cdef int res = SDL_GetTextureBlendMode(self._tex, &blendMode) # <<<<<<<<<<<<<< @@ -9734,7 +9792,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_10blend_mode___get__(st */ __pyx_v_res = SDL_GetTextureBlendMode(__pyx_v_self->_tex, (&__pyx_v_blendMode)); - /* "pygame/_sdl2/video.pyx":697 + /* "pygame/_sdl2/video.pyx":699 * cdef SDL_BlendMode blendMode * cdef int res = SDL_GetTextureBlendMode(self._tex, &blendMode) * if res < 0: # <<<<<<<<<<<<<< @@ -9744,14 +9802,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_10blend_mode___get__(st __pyx_t_1 = ((__pyx_v_res < 0) != 0); if (unlikely(__pyx_t_1)) { - /* "pygame/_sdl2/video.pyx":698 + /* "pygame/_sdl2/video.pyx":700 * cdef int 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, 698, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 700, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { @@ -9765,14 +9823,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_10blend_mode___get__(st } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 698, __pyx_L1_error) + 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_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 698, __pyx_L1_error) + __PYX_ERR(0, 700, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":697 + /* "pygame/_sdl2/video.pyx":699 * cdef SDL_BlendMode blendMode * cdef int res = SDL_GetTextureBlendMode(self._tex, &blendMode) * if res < 0: # <<<<<<<<<<<<<< @@ -9781,7 +9839,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_10blend_mode___get__(st */ } - /* "pygame/_sdl2/video.pyx":700 + /* "pygame/_sdl2/video.pyx":702 * raise error() * * return blendMode # <<<<<<<<<<<<<< @@ -9789,13 +9847,13 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_10blend_mode___get__(st * @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, 700, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_SDL_BlendMode(__pyx_v_blendMode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 702, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "pygame/_sdl2/video.pyx":688 + /* "pygame/_sdl2/video.pyx":690 * * @property * def blend_mode(self): # <<<<<<<<<<<<<< @@ -9816,7 +9874,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_10blend_mode___get__(st return __pyx_r; } -/* "pygame/_sdl2/video.pyx":703 +/* "pygame/_sdl2/video.pyx":705 * * @blend_mode.setter * def blend_mode(self, blendMode): # <<<<<<<<<<<<<< @@ -9851,17 +9909,17 @@ static int __pyx_pf_6pygame_5_sdl2_5video_7Texture_10blend_mode_2__set__(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - /* "pygame/_sdl2/video.pyx":705 + /* "pygame/_sdl2/video.pyx":707 * def blend_mode(self, blendMode): * # https://wiki.libsdl.org/SDL_SetTextureBlendMode * cdef int 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, 705, __pyx_L1_error) + __pyx_t_1 = ((SDL_BlendMode)__Pyx_PyInt_As_SDL_BlendMode(__pyx_v_blendMode)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 707, __pyx_L1_error) __pyx_v_res = SDL_SetTextureBlendMode(__pyx_v_self->_tex, __pyx_t_1); - /* "pygame/_sdl2/video.pyx":706 + /* "pygame/_sdl2/video.pyx":708 * # https://wiki.libsdl.org/SDL_SetTextureBlendMode * cdef int res = SDL_SetTextureBlendMode(self._tex, blendMode) * if res < 0: # <<<<<<<<<<<<<< @@ -9871,14 +9929,14 @@ static int __pyx_pf_6pygame_5_sdl2_5video_7Texture_10blend_mode_2__set__(struct __pyx_t_2 = ((__pyx_v_res < 0) != 0); if (unlikely(__pyx_t_2)) { - /* "pygame/_sdl2/video.pyx":707 + /* "pygame/_sdl2/video.pyx":709 * cdef int 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, 707, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_error); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 709, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { @@ -9892,14 +9950,14 @@ static int __pyx_pf_6pygame_5_sdl2_5video_7Texture_10blend_mode_2__set__(struct } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 707, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 709, __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, 707, __pyx_L1_error) + __PYX_ERR(0, 709, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":706 + /* "pygame/_sdl2/video.pyx":708 * # https://wiki.libsdl.org/SDL_SetTextureBlendMode * cdef int res = SDL_SetTextureBlendMode(self._tex, blendMode) * if res < 0: # <<<<<<<<<<<<<< @@ -9908,7 +9966,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_7Texture_10blend_mode_2__set__(struct */ } - /* "pygame/_sdl2/video.pyx":703 + /* "pygame/_sdl2/video.pyx":705 * * @blend_mode.setter * def blend_mode(self, blendMode): # <<<<<<<<<<<<<< @@ -9930,7 +9988,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_7Texture_10blend_mode_2__set__(struct return __pyx_r; } -/* "pygame/_sdl2/video.pyx":710 +/* "pygame/_sdl2/video.pyx":712 * * @property * def color(self): # <<<<<<<<<<<<<< @@ -9964,7 +10022,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_5color___get__(struct _ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "pygame/_sdl2/video.pyx":714 + /* "pygame/_sdl2/video.pyx":716 * """ * # https://wiki.libsdl.org/SDL_GetTextureColorMod * cdef int res = SDL_GetTextureColorMod(self._tex, # <<<<<<<<<<<<<< @@ -9973,7 +10031,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_5color___get__(struct _ */ __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":718 + /* "pygame/_sdl2/video.pyx":720 * &self._color.data[1], * &self._color.data[2]) * if res < 0: # <<<<<<<<<<<<<< @@ -9983,14 +10041,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_5color___get__(struct _ __pyx_t_1 = ((__pyx_v_res < 0) != 0); if (unlikely(__pyx_t_1)) { - /* "pygame/_sdl2/video.pyx":719 + /* "pygame/_sdl2/video.pyx":721 * &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, 719, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 721, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { @@ -10004,14 +10062,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_5color___get__(struct _ } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 719, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 721, __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, 719, __pyx_L1_error) + __PYX_ERR(0, 721, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":718 + /* "pygame/_sdl2/video.pyx":720 * &self._color.data[1], * &self._color.data[2]) * if res < 0: # <<<<<<<<<<<<<< @@ -10020,7 +10078,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_5color___get__(struct _ */ } - /* "pygame/_sdl2/video.pyx":721 + /* "pygame/_sdl2/video.pyx":723 * raise error() * * return self._color # <<<<<<<<<<<<<< @@ -10032,7 +10090,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_5color___get__(struct _ __pyx_r = ((PyObject *)__pyx_v_self->_color); goto __pyx_L0; - /* "pygame/_sdl2/video.pyx":710 + /* "pygame/_sdl2/video.pyx":712 * * @property * def color(self): # <<<<<<<<<<<<<< @@ -10053,7 +10111,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_5color___get__(struct _ return __pyx_r; } -/* "pygame/_sdl2/video.pyx":724 +/* "pygame/_sdl2/video.pyx":726 * * @color.setter * def color(self, new_value): # <<<<<<<<<<<<<< @@ -10090,43 +10148,43 @@ static int __pyx_pf_6pygame_5_sdl2_5video_7Texture_5color_2__set__(struct __pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - /* "pygame/_sdl2/video.pyx":727 + /* "pygame/_sdl2/video.pyx":729 * # https://wiki.libsdl.org/SDL_SetTextureColorMod * cdef int 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, 727, __pyx_L1_error) + __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, 729, __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, 727, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_As_Uint8(__pyx_t_1); if (unlikely((__pyx_t_2 == ((Uint8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 729, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sdl2/video.pyx":728 + /* "pygame/_sdl2/video.pyx":730 * cdef int 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, 728, __pyx_L1_error) + __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, 730, __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, 728, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_As_Uint8(__pyx_t_1); if (unlikely((__pyx_t_3 == ((Uint8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 730, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sdl2/video.pyx":729 + /* "pygame/_sdl2/video.pyx":731 * 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, 729, __pyx_L1_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, 731, __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, 729, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_As_Uint8(__pyx_t_1); if (unlikely((__pyx_t_4 == ((Uint8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 731, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sdl2/video.pyx":726 + /* "pygame/_sdl2/video.pyx":728 * def color(self, new_value): * # https://wiki.libsdl.org/SDL_SetTextureColorMod * cdef int res = SDL_SetTextureColorMod(self._tex, # <<<<<<<<<<<<<< @@ -10135,7 +10193,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_7Texture_5color_2__set__(struct __pyx_ */ __pyx_v_res = SDL_SetTextureColorMod(__pyx_v_self->_tex, __pyx_t_2, __pyx_t_3, __pyx_t_4); - /* "pygame/_sdl2/video.pyx":730 + /* "pygame/_sdl2/video.pyx":732 * new_value[1], * new_value[2]) * if res < 0: # <<<<<<<<<<<<<< @@ -10145,14 +10203,14 @@ static int __pyx_pf_6pygame_5_sdl2_5video_7Texture_5color_2__set__(struct __pyx_ __pyx_t_5 = ((__pyx_v_res < 0) != 0); if (unlikely(__pyx_t_5)) { - /* "pygame/_sdl2/video.pyx":731 + /* "pygame/_sdl2/video.pyx":733 * 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, 731, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_error); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 733, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { @@ -10166,14 +10224,14 @@ static int __pyx_pf_6pygame_5_sdl2_5video_7Texture_5color_2__set__(struct __pyx_ } __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 731, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 733, __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, 731, __pyx_L1_error) + __PYX_ERR(0, 733, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":730 + /* "pygame/_sdl2/video.pyx":732 * new_value[1], * new_value[2]) * if res < 0: # <<<<<<<<<<<<<< @@ -10182,7 +10240,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_7Texture_5color_2__set__(struct __pyx_ */ } - /* "pygame/_sdl2/video.pyx":724 + /* "pygame/_sdl2/video.pyx":726 * * @color.setter * def color(self, new_value): # <<<<<<<<<<<<<< @@ -10204,7 +10262,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_7Texture_5color_2__set__(struct __pyx_ return __pyx_r; } -/* "pygame/_sdl2/video.pyx":733 +/* "pygame/_sdl2/video.pyx":735 * raise error() * * def get_rect(self, **kwargs): # <<<<<<<<<<<<<< @@ -10250,19 +10308,19 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_8get_rect(struct __pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_rect", 0); - /* "pygame/_sdl2/video.pyx":741 + /* "pygame/_sdl2/video.pyx":743 * 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, 741, __pyx_L1_error) + __pyx_t_1 = pgRect_New4(0, 0, __pyx_v_self->width, __pyx_v_self->height); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 743, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_rect = __pyx_t_1; __pyx_t_1 = 0; - /* "pygame/_sdl2/video.pyx":742 + /* "pygame/_sdl2/video.pyx":744 * """ * rect = pgRect_New4(0, 0, self.width, self.height) * for key in kwargs: # <<<<<<<<<<<<<< @@ -10270,7 +10328,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_8get_rect(struct __pyx_ * */ __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, 742, __pyx_L1_error) + __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, 744, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = __pyx_t_5; @@ -10278,26 +10336,26 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_8get_rect(struct __pyx_ 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, 742, __pyx_L1_error) + if (unlikely(__pyx_t_6 == -1)) __PYX_ERR(0, 744, __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":743 + /* "pygame/_sdl2/video.pyx":745 * 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, 743, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_v_key); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 745, __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, 743, __pyx_L1_error) + __pyx_t_7 = PyObject_SetAttr(__pyx_v_rect, __pyx_v_key, __pyx_t_5); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 745, __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":745 + /* "pygame/_sdl2/video.pyx":747 * setattr(rect, key, kwargs[key]) * * return rect # <<<<<<<<<<<<<< @@ -10309,7 +10367,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_8get_rect(struct __pyx_ __pyx_r = __pyx_v_rect; goto __pyx_L0; - /* "pygame/_sdl2/video.pyx":733 + /* "pygame/_sdl2/video.pyx":735 * raise error() * * def get_rect(self, **kwargs): # <<<<<<<<<<<<<< @@ -10331,7 +10389,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_8get_rect(struct __pyx_ return __pyx_r; } -/* "pygame/_sdl2/video.pyx":747 +/* "pygame/_sdl2/video.pyx":749 * return rect * * cdef draw_internal(self, SDL_Rect *csrcrect, SDL_Rect *cdstrect, float angle=0, SDL_Point *originptr=NULL, # <<<<<<<<<<<<<< @@ -10343,7 +10401,7 @@ static PyObject *__pyx_f_6pygame_5_sdl2_5video_7Texture_draw_internal(struct __p float __pyx_v_angle = ((float)0.0); SDL_Point *__pyx_v_originptr = ((SDL_Point *)NULL); - /* "pygame/_sdl2/video.pyx":748 + /* "pygame/_sdl2/video.pyx":750 * * 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): # <<<<<<<<<<<<<< @@ -10379,7 +10437,7 @@ static PyObject *__pyx_f_6pygame_5_sdl2_5video_7Texture_draw_internal(struct __p } } - /* "pygame/_sdl2/video.pyx":749 + /* "pygame/_sdl2/video.pyx":751 * 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 # <<<<<<<<<<<<<< @@ -10388,7 +10446,7 @@ static PyObject *__pyx_f_6pygame_5_sdl2_5video_7Texture_draw_internal(struct __p */ __pyx_v_flip = SDL_FLIP_NONE; - /* "pygame/_sdl2/video.pyx":750 + /* "pygame/_sdl2/video.pyx":752 * bint flip_x=False, bint flip_y=False): * cdef int flip = SDL_FLIP_NONE * if flip_x: # <<<<<<<<<<<<<< @@ -10398,7 +10456,7 @@ static PyObject *__pyx_f_6pygame_5_sdl2_5video_7Texture_draw_internal(struct __p __pyx_t_1 = (__pyx_v_flip_x != 0); if (__pyx_t_1) { - /* "pygame/_sdl2/video.pyx":751 + /* "pygame/_sdl2/video.pyx":753 * cdef int flip = SDL_FLIP_NONE * if flip_x: * flip |= SDL_FLIP_HORIZONTAL # <<<<<<<<<<<<<< @@ -10407,7 +10465,7 @@ static PyObject *__pyx_f_6pygame_5_sdl2_5video_7Texture_draw_internal(struct __p */ __pyx_v_flip = (__pyx_v_flip | SDL_FLIP_HORIZONTAL); - /* "pygame/_sdl2/video.pyx":750 + /* "pygame/_sdl2/video.pyx":752 * bint flip_x=False, bint flip_y=False): * cdef int flip = SDL_FLIP_NONE * if flip_x: # <<<<<<<<<<<<<< @@ -10416,7 +10474,7 @@ static PyObject *__pyx_f_6pygame_5_sdl2_5video_7Texture_draw_internal(struct __p */ } - /* "pygame/_sdl2/video.pyx":752 + /* "pygame/_sdl2/video.pyx":754 * if flip_x: * flip |= SDL_FLIP_HORIZONTAL * if flip_y: # <<<<<<<<<<<<<< @@ -10426,7 +10484,7 @@ static PyObject *__pyx_f_6pygame_5_sdl2_5video_7Texture_draw_internal(struct __p __pyx_t_1 = (__pyx_v_flip_y != 0); if (__pyx_t_1) { - /* "pygame/_sdl2/video.pyx":753 + /* "pygame/_sdl2/video.pyx":755 * flip |= SDL_FLIP_HORIZONTAL * if flip_y: * flip |= SDL_FLIP_VERTICAL # <<<<<<<<<<<<<< @@ -10435,7 +10493,7 @@ static PyObject *__pyx_f_6pygame_5_sdl2_5video_7Texture_draw_internal(struct __p */ __pyx_v_flip = (__pyx_v_flip | SDL_FLIP_VERTICAL); - /* "pygame/_sdl2/video.pyx":752 + /* "pygame/_sdl2/video.pyx":754 * if flip_x: * flip |= SDL_FLIP_HORIZONTAL * if flip_y: # <<<<<<<<<<<<<< @@ -10444,7 +10502,7 @@ static PyObject *__pyx_f_6pygame_5_sdl2_5video_7Texture_draw_internal(struct __p */ } - /* "pygame/_sdl2/video.pyx":755 + /* "pygame/_sdl2/video.pyx":757 * flip |= SDL_FLIP_VERTICAL * * cdef int res = SDL_RenderCopyEx(self.renderer._renderer, self._tex, csrcrect, cdstrect, # <<<<<<<<<<<<<< @@ -10453,7 +10511,7 @@ static PyObject *__pyx_f_6pygame_5_sdl2_5video_7Texture_draw_internal(struct __p */ __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":757 + /* "pygame/_sdl2/video.pyx":759 * cdef int res = SDL_RenderCopyEx(self.renderer._renderer, self._tex, csrcrect, cdstrect, * angle, originptr, flip) * if res < 0: # <<<<<<<<<<<<<< @@ -10463,14 +10521,14 @@ static PyObject *__pyx_f_6pygame_5_sdl2_5video_7Texture_draw_internal(struct __p __pyx_t_1 = ((__pyx_v_res < 0) != 0); if (unlikely(__pyx_t_1)) { - /* "pygame/_sdl2/video.pyx":758 + /* "pygame/_sdl2/video.pyx":760 * 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, 758, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 760, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { @@ -10484,14 +10542,14 @@ static PyObject *__pyx_f_6pygame_5_sdl2_5video_7Texture_draw_internal(struct __p } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 758, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 760, __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, 758, __pyx_L1_error) + __PYX_ERR(0, 760, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":757 + /* "pygame/_sdl2/video.pyx":759 * cdef int res = SDL_RenderCopyEx(self.renderer._renderer, self._tex, csrcrect, cdstrect, * angle, originptr, flip) * if res < 0: # <<<<<<<<<<<<<< @@ -10500,7 +10558,7 @@ static PyObject *__pyx_f_6pygame_5_sdl2_5video_7Texture_draw_internal(struct __p */ } - /* "pygame/_sdl2/video.pyx":747 + /* "pygame/_sdl2/video.pyx":749 * return rect * * cdef draw_internal(self, SDL_Rect *csrcrect, SDL_Rect *cdstrect, float angle=0, SDL_Point *originptr=NULL, # <<<<<<<<<<<<<< @@ -10523,7 +10581,7 @@ static PyObject *__pyx_f_6pygame_5_sdl2_5video_7Texture_draw_internal(struct __p return __pyx_r; } -/* "pygame/_sdl2/video.pyx":760 +/* "pygame/_sdl2/video.pyx":762 * raise error() * * cpdef void draw(self, srcrect=None, dstrect=None, float angle=0, origin=None, # <<<<<<<<<<<<<< @@ -10538,7 +10596,7 @@ static void __pyx_f_6pygame_5_sdl2_5video_7Texture_draw(struct __pyx_obj_6pygame float __pyx_v_angle = ((float)0.0); PyObject *__pyx_v_origin = ((PyObject *)Py_None); - /* "pygame/_sdl2/video.pyx":761 + /* "pygame/_sdl2/video.pyx":763 * * cpdef void draw(self, srcrect=None, dstrect=None, float angle=0, origin=None, * bint flip_x=False, bint flip_y=False): # <<<<<<<<<<<<<< @@ -10592,7 +10650,7 @@ static void __pyx_f_6pygame_5_sdl2_5video_7Texture_draw(struct __pyx_obj_6pygame } } - /* "pygame/_sdl2/video.pyx":760 + /* "pygame/_sdl2/video.pyx":762 * raise error() * * cpdef void draw(self, srcrect=None, dstrect=None, float angle=0, origin=None, # <<<<<<<<<<<<<< @@ -10608,14 +10666,14 @@ static void __pyx_f_6pygame_5_sdl2_5video_7Texture_draw(struct __pyx_obj_6pygame if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_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, 760, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_draw); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 762, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(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, 760, __pyx_L1_error) + __pyx_t_3 = PyFloat_FromDouble(__pyx_v_angle); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 762, __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, 760, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_flip_x); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 762, __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, 760, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_flip_y); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 762, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = __pyx_t_1; __pyx_t_7 = NULL; @@ -10633,7 +10691,7 @@ static void __pyx_f_6pygame_5_sdl2_5video_7Texture_draw(struct __pyx_obj_6pygame #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[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_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 6+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 760, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 6+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 762, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -10644,7 +10702,7 @@ static void __pyx_f_6pygame_5_sdl2_5video_7Texture_draw(struct __pyx_obj_6pygame #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[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_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 6+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 760, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 6+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 762, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -10653,7 +10711,7 @@ static void __pyx_f_6pygame_5_sdl2_5video_7Texture_draw(struct __pyx_obj_6pygame } else #endif { - __pyx_t_9 = PyTuple_New(6+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 760, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(6+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 762, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; @@ -10676,7 +10734,7 @@ static void __pyx_f_6pygame_5_sdl2_5video_7Texture_draw(struct __pyx_obj_6pygame __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 760, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 762, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } @@ -10698,7 +10756,7 @@ static void __pyx_f_6pygame_5_sdl2_5video_7Texture_draw(struct __pyx_obj_6pygame #endif } - /* "pygame/_sdl2/video.pyx":778 + /* "pygame/_sdl2/video.pyx":780 * """ * cdef SDL_Rect src, dst * cdef SDL_Rect *csrcrect = NULL # <<<<<<<<<<<<<< @@ -10707,7 +10765,7 @@ static void __pyx_f_6pygame_5_sdl2_5video_7Texture_draw(struct __pyx_obj_6pygame */ __pyx_v_csrcrect = NULL; - /* "pygame/_sdl2/video.pyx":779 + /* "pygame/_sdl2/video.pyx":781 * cdef SDL_Rect src, dst * cdef SDL_Rect *csrcrect = NULL * cdef SDL_Rect *cdstrect = NULL # <<<<<<<<<<<<<< @@ -10716,7 +10774,7 @@ static void __pyx_f_6pygame_5_sdl2_5video_7Texture_draw(struct __pyx_obj_6pygame */ __pyx_v_cdstrect = NULL; - /* "pygame/_sdl2/video.pyx":783 + /* "pygame/_sdl2/video.pyx":785 * cdef SDL_Point *originptr * * if srcrect is not None: # <<<<<<<<<<<<<< @@ -10727,7 +10785,7 @@ static void __pyx_f_6pygame_5_sdl2_5video_7Texture_draw(struct __pyx_obj_6pygame __pyx_t_11 = (__pyx_t_10 != 0); if (__pyx_t_11) { - /* "pygame/_sdl2/video.pyx":784 + /* "pygame/_sdl2/video.pyx":786 * * if srcrect is not None: * csrcrect = pgRect_FromObject(srcrect, &src) # <<<<<<<<<<<<<< @@ -10736,7 +10794,7 @@ static void __pyx_f_6pygame_5_sdl2_5video_7Texture_draw(struct __pyx_obj_6pygame */ __pyx_v_csrcrect = pgRect_FromObject(__pyx_v_srcrect, (&__pyx_v_src)); - /* "pygame/_sdl2/video.pyx":785 + /* "pygame/_sdl2/video.pyx":787 * if srcrect is not None: * csrcrect = pgRect_FromObject(srcrect, &src) * if not csrcrect: # <<<<<<<<<<<<<< @@ -10746,20 +10804,20 @@ static void __pyx_f_6pygame_5_sdl2_5video_7Texture_draw(struct __pyx_obj_6pygame __pyx_t_11 = ((!(__pyx_v_csrcrect != 0)) != 0); if (unlikely(__pyx_t_11)) { - /* "pygame/_sdl2/video.pyx":786 + /* "pygame/_sdl2/video.pyx":788 * 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__14, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 786, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 788, __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, 786, __pyx_L1_error) + __PYX_ERR(0, 788, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":785 + /* "pygame/_sdl2/video.pyx":787 * if srcrect is not None: * csrcrect = pgRect_FromObject(srcrect, &src) * if not csrcrect: # <<<<<<<<<<<<<< @@ -10768,7 +10826,7 @@ static void __pyx_f_6pygame_5_sdl2_5video_7Texture_draw(struct __pyx_obj_6pygame */ } - /* "pygame/_sdl2/video.pyx":783 + /* "pygame/_sdl2/video.pyx":785 * cdef SDL_Point *originptr * * if srcrect is not None: # <<<<<<<<<<<<<< @@ -10777,7 +10835,7 @@ static void __pyx_f_6pygame_5_sdl2_5video_7Texture_draw(struct __pyx_obj_6pygame */ } - /* "pygame/_sdl2/video.pyx":788 + /* "pygame/_sdl2/video.pyx":790 * raise TypeError("the argument is not a rectangle or None") * * if dstrect is not None: # <<<<<<<<<<<<<< @@ -10788,7 +10846,7 @@ static void __pyx_f_6pygame_5_sdl2_5video_7Texture_draw(struct __pyx_obj_6pygame __pyx_t_10 = (__pyx_t_11 != 0); if (__pyx_t_10) { - /* "pygame/_sdl2/video.pyx":789 + /* "pygame/_sdl2/video.pyx":791 * * if dstrect is not None: * cdstrect = pgRect_FromObject(dstrect, &dst) # <<<<<<<<<<<<<< @@ -10797,7 +10855,7 @@ static void __pyx_f_6pygame_5_sdl2_5video_7Texture_draw(struct __pyx_obj_6pygame */ __pyx_v_cdstrect = pgRect_FromObject(__pyx_v_dstrect, (&__pyx_v_dst)); - /* "pygame/_sdl2/video.pyx":790 + /* "pygame/_sdl2/video.pyx":792 * if dstrect is not None: * cdstrect = pgRect_FromObject(dstrect, &dst) * if cdstrect == NULL: # <<<<<<<<<<<<<< @@ -10807,44 +10865,44 @@ static void __pyx_f_6pygame_5_sdl2_5video_7Texture_draw(struct __pyx_obj_6pygame __pyx_t_10 = ((__pyx_v_cdstrect == NULL) != 0); if (__pyx_t_10) { - /* "pygame/_sdl2/video.pyx":791 + /* "pygame/_sdl2/video.pyx":793 * cdstrect = pgRect_FromObject(dstrect, &dst) * if cdstrect == NULL: * if len(dstrect) == 2: # <<<<<<<<<<<<<< * dst.x = dstrect[0] * dst.y = dstrect[1] */ - __pyx_t_12 = PyObject_Length(__pyx_v_dstrect); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(0, 791, __pyx_L1_error) + __pyx_t_12 = PyObject_Length(__pyx_v_dstrect); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(0, 793, __pyx_L1_error) __pyx_t_10 = ((__pyx_t_12 == 2) != 0); if (likely(__pyx_t_10)) { - /* "pygame/_sdl2/video.pyx":792 + /* "pygame/_sdl2/video.pyx":794 * 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, 792, __pyx_L1_error) + __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, 794, __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, 792, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 794, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dst.x = __pyx_t_8; - /* "pygame/_sdl2/video.pyx":793 + /* "pygame/_sdl2/video.pyx":795 * 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, 793, __pyx_L1_error) + __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, 795, __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, 793, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 795, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dst.y = __pyx_t_8; - /* "pygame/_sdl2/video.pyx":794 + /* "pygame/_sdl2/video.pyx":796 * dst.x = dstrect[0] * dst.y = dstrect[1] * dst.w = self.width # <<<<<<<<<<<<<< @@ -10854,7 +10912,7 @@ static void __pyx_f_6pygame_5_sdl2_5video_7Texture_draw(struct __pyx_obj_6pygame __pyx_t_8 = __pyx_v_self->width; __pyx_v_dst.w = __pyx_t_8; - /* "pygame/_sdl2/video.pyx":795 + /* "pygame/_sdl2/video.pyx":797 * dst.y = dstrect[1] * dst.w = self.width * dst.h = self.height # <<<<<<<<<<<<<< @@ -10864,7 +10922,7 @@ static void __pyx_f_6pygame_5_sdl2_5video_7Texture_draw(struct __pyx_obj_6pygame __pyx_t_8 = __pyx_v_self->height; __pyx_v_dst.h = __pyx_t_8; - /* "pygame/_sdl2/video.pyx":796 + /* "pygame/_sdl2/video.pyx":798 * dst.w = self.width * dst.h = self.height * cdstrect = &dst # <<<<<<<<<<<<<< @@ -10873,7 +10931,7 @@ static void __pyx_f_6pygame_5_sdl2_5video_7Texture_draw(struct __pyx_obj_6pygame */ __pyx_v_cdstrect = (&__pyx_v_dst); - /* "pygame/_sdl2/video.pyx":791 + /* "pygame/_sdl2/video.pyx":793 * cdstrect = pgRect_FromObject(dstrect, &dst) * if cdstrect == NULL: * if len(dstrect) == 2: # <<<<<<<<<<<<<< @@ -10883,7 +10941,7 @@ static void __pyx_f_6pygame_5_sdl2_5video_7Texture_draw(struct __pyx_obj_6pygame goto __pyx_L7; } - /* "pygame/_sdl2/video.pyx":798 + /* "pygame/_sdl2/video.pyx":800 * cdstrect = &dst * else: * raise TypeError('dstrect must be a position, rect, or None') # <<<<<<<<<<<<<< @@ -10891,15 +10949,15 @@ static void __pyx_f_6pygame_5_sdl2_5video_7Texture_draw(struct __pyx_obj_6pygame * if origin: */ /*else*/ { - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 798, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 800, __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, 798, __pyx_L1_error) + __PYX_ERR(0, 800, __pyx_L1_error) } __pyx_L7:; - /* "pygame/_sdl2/video.pyx":790 + /* "pygame/_sdl2/video.pyx":792 * if dstrect is not None: * cdstrect = pgRect_FromObject(dstrect, &dst) * if cdstrect == NULL: # <<<<<<<<<<<<<< @@ -10908,7 +10966,7 @@ static void __pyx_f_6pygame_5_sdl2_5video_7Texture_draw(struct __pyx_obj_6pygame */ } - /* "pygame/_sdl2/video.pyx":788 + /* "pygame/_sdl2/video.pyx":790 * raise TypeError("the argument is not a rectangle or None") * * if dstrect is not None: # <<<<<<<<<<<<<< @@ -10917,17 +10975,17 @@ static void __pyx_f_6pygame_5_sdl2_5video_7Texture_draw(struct __pyx_obj_6pygame */ } - /* "pygame/_sdl2/video.pyx":800 + /* "pygame/_sdl2/video.pyx":802 * raise TypeError('dstrect must be a position, rect, or None') * * if origin: # <<<<<<<<<<<<<< * originptr = &corigin * corigin.x = origin[0] */ - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_origin); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 800, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_origin); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 802, __pyx_L1_error) if (__pyx_t_10) { - /* "pygame/_sdl2/video.pyx":801 + /* "pygame/_sdl2/video.pyx":803 * * if origin: * originptr = &corigin # <<<<<<<<<<<<<< @@ -10936,33 +10994,33 @@ static void __pyx_f_6pygame_5_sdl2_5video_7Texture_draw(struct __pyx_obj_6pygame */ __pyx_v_originptr = (&__pyx_v_corigin); - /* "pygame/_sdl2/video.pyx":802 + /* "pygame/_sdl2/video.pyx":804 * 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, 802, __pyx_L1_error) + __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, 804, __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, 802, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 804, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_corigin.x = __pyx_t_8; - /* "pygame/_sdl2/video.pyx":803 + /* "pygame/_sdl2/video.pyx":805 * 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, 803, __pyx_L1_error) + __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, 805, __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, 803, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 805, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_corigin.y = __pyx_t_8; - /* "pygame/_sdl2/video.pyx":800 + /* "pygame/_sdl2/video.pyx":802 * raise TypeError('dstrect must be a position, rect, or None') * * if origin: # <<<<<<<<<<<<<< @@ -10972,7 +11030,7 @@ static void __pyx_f_6pygame_5_sdl2_5video_7Texture_draw(struct __pyx_obj_6pygame goto __pyx_L8; } - /* "pygame/_sdl2/video.pyx":805 + /* "pygame/_sdl2/video.pyx":807 * corigin.y = origin[1] * else: * originptr = NULL # <<<<<<<<<<<<<< @@ -10984,7 +11042,7 @@ static void __pyx_f_6pygame_5_sdl2_5video_7Texture_draw(struct __pyx_obj_6pygame } __pyx_L8:; - /* "pygame/_sdl2/video.pyx":807 + /* "pygame/_sdl2/video.pyx":809 * originptr = NULL * * self.draw_internal(csrcrect, cdstrect, angle, originptr, # <<<<<<<<<<<<<< @@ -10996,11 +11054,11 @@ static void __pyx_f_6pygame_5_sdl2_5video_7Texture_draw(struct __pyx_obj_6pygame __pyx_t_13.originptr = __pyx_v_originptr; __pyx_t_13.flip_x = __pyx_v_flip_x; __pyx_t_13.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_13); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 807, __pyx_L1_error) + __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_13); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 809, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sdl2/video.pyx":760 + /* "pygame/_sdl2/video.pyx":762 * raise error() * * cpdef void draw(self, srcrect=None, dstrect=None, float angle=0, origin=None, # <<<<<<<<<<<<<< @@ -11104,7 +11162,7 @@ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7Texture_11draw(PyObject *__pyx_ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "draw") < 0)) __PYX_ERR(0, 760, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "draw") < 0)) __PYX_ERR(0, 762, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -11127,16 +11185,16 @@ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7Texture_11draw(PyObject *__pyx_ __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, 760, __pyx_L3_error) + __pyx_v_angle = __pyx_PyFloat_AsFloat(values[2]); if (unlikely((__pyx_v_angle == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 762, __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, 761, __pyx_L3_error) + __pyx_v_flip_x = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_flip_x == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 763, __pyx_L3_error) } else { - /* "pygame/_sdl2/video.pyx":761 + /* "pygame/_sdl2/video.pyx":763 * * cpdef void draw(self, srcrect=None, dstrect=None, float angle=0, origin=None, * bint flip_x=False, bint flip_y=False): # <<<<<<<<<<<<<< @@ -11146,14 +11204,14 @@ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7Texture_11draw(PyObject *__pyx_ __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, 761, __pyx_L3_error) + __pyx_v_flip_y = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_flip_y == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 763, __pyx_L3_error) } else { __pyx_v_flip_y = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("draw", 0, 0, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 760, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("draw", 0, 0, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 762, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pygame._sdl2.video.Texture.draw", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -11161,7 +11219,7 @@ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7Texture_11draw(PyObject *__pyx_ __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":760 + /* "pygame/_sdl2/video.pyx":762 * raise error() * * cpdef void draw(self, srcrect=None, dstrect=None, float angle=0, origin=None, # <<<<<<<<<<<<<< @@ -11192,7 +11250,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_10draw(struct __pyx_obj __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, 760, __pyx_L1_error) + __pyx_t_2 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 762, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -11209,7 +11267,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_10draw(struct __pyx_obj return __pyx_r; } -/* "pygame/_sdl2/video.pyx":810 +/* "pygame/_sdl2/video.pyx":812 * flip_x, flip_y) * * def draw_triangle(self, p1_xy, p2_xy, p3_xy, # <<<<<<<<<<<<<< @@ -11240,7 +11298,7 @@ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7Texture_13draw_triangle(PyObjec static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_p1_xy,&__pyx_n_s_p2_xy,&__pyx_n_s_p3_xy,&__pyx_n_s_p1_uv,&__pyx_n_s_p2_uv,&__pyx_n_s_p3_uv,&__pyx_n_s_p1_mod,&__pyx_n_s_p2_mod,&__pyx_n_s_p3_mod,0}; PyObject* values[9] = {0,0,0,0,0,0,0,0,0}; - /* "pygame/_sdl2/video.pyx":811 + /* "pygame/_sdl2/video.pyx":813 * * def draw_triangle(self, p1_xy, p2_xy, p3_xy, * p1_uv=(0.0, 0.0), p2_uv=(1.0, 1.0), p3_uv=(0.0, 1.0), # <<<<<<<<<<<<<< @@ -11251,7 +11309,7 @@ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7Texture_13draw_triangle(PyObjec values[4] = ((PyObject *)__pyx_tuple__17); values[5] = ((PyObject *)__pyx_tuple__18); - /* "pygame/_sdl2/video.pyx":812 + /* "pygame/_sdl2/video.pyx":814 * def draw_triangle(self, p1_xy, p2_xy, p3_xy, * p1_uv=(0.0, 0.0), p2_uv=(1.0, 1.0), p3_uv=(0.0, 1.0), * p1_mod=(255, 255, 255, 255), p2_mod=(255, 255, 255, 255), p3_mod=(255, 255, 255, 255)): # <<<<<<<<<<<<<< @@ -11295,13 +11353,13 @@ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7Texture_13draw_triangle(PyObjec case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_p2_xy)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("draw_triangle", 0, 3, 9, 1); __PYX_ERR(0, 810, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("draw_triangle", 0, 3, 9, 1); __PYX_ERR(0, 812, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_p3_xy)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("draw_triangle", 0, 3, 9, 2); __PYX_ERR(0, 810, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("draw_triangle", 0, 3, 9, 2); __PYX_ERR(0, 812, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: @@ -11341,7 +11399,7 @@ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7Texture_13draw_triangle(PyObjec } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "draw_triangle") < 0)) __PYX_ERR(0, 810, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "draw_triangle") < 0)) __PYX_ERR(0, 812, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -11376,7 +11434,7 @@ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7Texture_13draw_triangle(PyObjec } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("draw_triangle", 0, 3, 9, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 810, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("draw_triangle", 0, 3, 9, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 812, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pygame._sdl2.video.Texture.draw_triangle", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -11384,7 +11442,7 @@ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7Texture_13draw_triangle(PyObjec __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_7Texture_12draw_triangle(((struct __pyx_obj_6pygame_5_sdl2_5video_Texture *)__pyx_v_self), __pyx_v_p1_xy, __pyx_v_p2_xy, __pyx_v_p3_xy, __pyx_v_p1_uv, __pyx_v_p2_uv, __pyx_v_p3_uv, __pyx_v_p1_mod, __pyx_v_p2_mod, __pyx_v_p3_mod); - /* "pygame/_sdl2/video.pyx":810 + /* "pygame/_sdl2/video.pyx":812 * flip_x, flip_y) * * def draw_triangle(self, p1_xy, p2_xy, p3_xy, # <<<<<<<<<<<<<< @@ -11433,7 +11491,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_12draw_triangle(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("draw_triangle", 0); - /* "pygame/_sdl2/video.pyx":825 + /* "pygame/_sdl2/video.pyx":827 * :param p3_mod: The third vertex color modulation. * """ * if not SDL_VERSION_ATLEAST(2, 0, 18): # <<<<<<<<<<<<<< @@ -11443,14 +11501,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_12draw_triangle(struct __pyx_t_1 = ((!(SDL_VERSION_ATLEAST(2, 0, 18) != 0)) != 0); if (unlikely(__pyx_t_1)) { - /* "pygame/_sdl2/video.pyx":826 + /* "pygame/_sdl2/video.pyx":828 * """ * if not SDL_VERSION_ATLEAST(2, 0, 18): * raise error("draw_triangle requires SDL 2.0.18 or newer") # <<<<<<<<<<<<<< * * cdef Uint8 _r_mod, _g_mod, _b_mod, _a_mod */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 826, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 828, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { @@ -11464,14 +11522,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_12draw_triangle(struct } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_s_draw_triangle_requires_SDL_2_0_1) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_s_draw_triangle_requires_SDL_2_0_1); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 826, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 828, __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, 826, __pyx_L1_error) + __PYX_ERR(0, 828, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":825 + /* "pygame/_sdl2/video.pyx":827 * :param p3_mod: The third vertex color modulation. * """ * if not SDL_VERSION_ATLEAST(2, 0, 18): # <<<<<<<<<<<<<< @@ -11480,7 +11538,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_12draw_triangle(struct */ } - /* "pygame/_sdl2/video.pyx":829 + /* "pygame/_sdl2/video.pyx":831 * * cdef Uint8 _r_mod, _g_mod, _b_mod, _a_mod * SDL_GetTextureColorMod(self._tex, &_r_mod, &_g_mod, &_b_mod) # <<<<<<<<<<<<<< @@ -11489,7 +11547,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_12draw_triangle(struct */ (void)(SDL_GetTextureColorMod(__pyx_v_self->_tex, (&__pyx_v__r_mod), (&__pyx_v__g_mod), (&__pyx_v__b_mod))); - /* "pygame/_sdl2/video.pyx":830 + /* "pygame/_sdl2/video.pyx":832 * cdef Uint8 _r_mod, _g_mod, _b_mod, _a_mod * SDL_GetTextureColorMod(self._tex, &_r_mod, &_g_mod, &_b_mod) * SDL_GetTextureAlphaMod(self._tex, &_a_mod) # <<<<<<<<<<<<<< @@ -11498,7 +11556,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_12draw_triangle(struct */ (void)(SDL_GetTextureAlphaMod(__pyx_v_self->_tex, (&__pyx_v__a_mod))); - /* "pygame/_sdl2/video.pyx":832 + /* "pygame/_sdl2/video.pyx":834 * SDL_GetTextureAlphaMod(self._tex, &_a_mod) * * cdef float r_mod = float(_r_mod) / 255.0 # <<<<<<<<<<<<<< @@ -11507,7 +11565,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_12draw_triangle(struct */ __pyx_v_r_mod = (((double)__pyx_v__r_mod) / 255.0); - /* "pygame/_sdl2/video.pyx":833 + /* "pygame/_sdl2/video.pyx":835 * * cdef float r_mod = float(_r_mod) / 255.0 * cdef float g_mod = float(_g_mod) / 255.0 # <<<<<<<<<<<<<< @@ -11516,7 +11574,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_12draw_triangle(struct */ __pyx_v_g_mod = (((double)__pyx_v__g_mod) / 255.0); - /* "pygame/_sdl2/video.pyx":834 + /* "pygame/_sdl2/video.pyx":836 * cdef float r_mod = float(_r_mod) / 255.0 * cdef float g_mod = float(_g_mod) / 255.0 * cdef float b_mod = float(_b_mod) / 255.0 # <<<<<<<<<<<<<< @@ -11525,7 +11583,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_12draw_triangle(struct */ __pyx_v_b_mod = (((double)__pyx_v__b_mod) / 255.0); - /* "pygame/_sdl2/video.pyx":835 + /* "pygame/_sdl2/video.pyx":837 * cdef float g_mod = float(_g_mod) / 255.0 * cdef float b_mod = float(_b_mod) / 255.0 * cdef float a_mod = float(_a_mod) / 255.0 # <<<<<<<<<<<<<< @@ -11534,7 +11592,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_12draw_triangle(struct */ __pyx_v_a_mod = (((double)__pyx_v__a_mod) / 255.0); - /* "pygame/_sdl2/video.pyx":838 + /* "pygame/_sdl2/video.pyx":840 * * cdef SDL_Vertex vertices[3] * for i, vert in enumerate(((p1_xy, p1_mod, p1_uv), # <<<<<<<<<<<<<< @@ -11543,7 +11601,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_12draw_triangle(struct */ __Pyx_INCREF(__pyx_int_0); __pyx_t_2 = __pyx_int_0; - __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 838, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 840, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_p1_xy); __Pyx_GIVEREF(__pyx_v_p1_xy); @@ -11555,14 +11613,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_12draw_triangle(struct __Pyx_GIVEREF(__pyx_v_p1_uv); PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_p1_uv); - /* "pygame/_sdl2/video.pyx":839 + /* "pygame/_sdl2/video.pyx":841 * cdef SDL_Vertex vertices[3] * for i, vert in enumerate(((p1_xy, p1_mod, p1_uv), * (p2_xy, p2_mod, p2_uv), # <<<<<<<<<<<<<< * (p3_xy, p3_mod, p3_uv))): * xy, mod, uv = vert */ - __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 839, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 841, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_p2_xy); __Pyx_GIVEREF(__pyx_v_p2_xy); @@ -11574,14 +11632,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_12draw_triangle(struct __Pyx_GIVEREF(__pyx_v_p2_uv); PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_p2_uv); - /* "pygame/_sdl2/video.pyx":840 + /* "pygame/_sdl2/video.pyx":842 * for i, vert in enumerate(((p1_xy, p1_mod, p1_uv), * (p2_xy, p2_mod, p2_uv), * (p3_xy, p3_mod, p3_uv))): # <<<<<<<<<<<<<< * xy, mod, uv = vert * vertices[i].position.x = xy[0] */ - __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 840, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 842, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_p3_xy); __Pyx_GIVEREF(__pyx_v_p3_xy); @@ -11593,14 +11651,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_12draw_triangle(struct __Pyx_GIVEREF(__pyx_v_p3_uv); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_p3_uv); - /* "pygame/_sdl2/video.pyx":838 + /* "pygame/_sdl2/video.pyx":840 * * cdef SDL_Vertex vertices[3] * for i, vert in enumerate(((p1_xy, p1_mod, p1_uv), # <<<<<<<<<<<<<< * (p2_xy, p2_mod, p2_uv), * (p3_xy, p3_mod, p3_uv))): */ - __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 838, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 840, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); @@ -11616,22 +11674,22 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_12draw_triangle(struct for (;;) { if (__pyx_t_7 >= 3) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 838, __pyx_L1_error) + __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 840, __pyx_L1_error) #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 838, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 840, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_XDECREF_SET(__pyx_v_vert, __pyx_t_6); __pyx_t_6 = 0; __Pyx_INCREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2); - __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_t_2, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 838, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_t_2, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 840, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = __pyx_t_6; __pyx_t_6 = 0; - /* "pygame/_sdl2/video.pyx":841 + /* "pygame/_sdl2/video.pyx":843 * (p2_xy, p2_mod, p2_uv), * (p3_xy, p3_mod, p3_uv))): * xy, mod, uv = vert # <<<<<<<<<<<<<< @@ -11644,7 +11702,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_12draw_triangle(struct if (unlikely(size != 3)) { if (size > 3) __Pyx_RaiseTooManyValuesError(3); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 841, __pyx_L1_error) + __PYX_ERR(0, 843, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -11660,16 +11718,16 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_12draw_triangle(struct __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); #else - __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 841, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 843, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 841, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 843, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 841, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 843, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } else { Py_ssize_t index = -1; - __pyx_t_8 = PyObject_GetIter(__pyx_v_vert); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 841, __pyx_L1_error) + __pyx_t_8 = PyObject_GetIter(__pyx_v_vert); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 843, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext; index = 0; __pyx_t_6 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L6_unpacking_failed; @@ -11678,7 +11736,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_12draw_triangle(struct __Pyx_GOTREF(__pyx_t_4); index = 2; __pyx_t_3 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_3)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 3) < 0) __PYX_ERR(0, 841, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 3) < 0) __PYX_ERR(0, 843, __pyx_L1_error) __pyx_t_9 = NULL; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L7_unpacking_done; @@ -11686,7 +11744,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_12draw_triangle(struct __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_9 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 841, __pyx_L1_error) + __PYX_ERR(0, 843, __pyx_L1_error) __pyx_L7_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_xy, __pyx_t_6); @@ -11696,149 +11754,149 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_12draw_triangle(struct __Pyx_XDECREF_SET(__pyx_v_uv, __pyx_t_3); __pyx_t_3 = 0; - /* "pygame/_sdl2/video.pyx":842 + /* "pygame/_sdl2/video.pyx":844 * (p3_xy, p3_mod, p3_uv))): * xy, mod, uv = vert * vertices[i].position.x = xy[0] # <<<<<<<<<<<<<< * vertices[i].position.y = xy[1] * vertices[i].color.r = r_mod * mod[0] */ - __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_xy, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 842, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_xy, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 844, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_10 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_10 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 842, __pyx_L1_error) + __pyx_t_10 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_10 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 844, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 842, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 844, __pyx_L1_error) (__pyx_v_vertices[__pyx_t_11]).position.x = __pyx_t_10; - /* "pygame/_sdl2/video.pyx":843 + /* "pygame/_sdl2/video.pyx":845 * xy, mod, uv = vert * vertices[i].position.x = xy[0] * vertices[i].position.y = xy[1] # <<<<<<<<<<<<<< * vertices[i].color.r = r_mod * mod[0] * vertices[i].color.g = g_mod * mod[1] */ - __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_xy, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 843, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_xy, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 845, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_10 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_10 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 843, __pyx_L1_error) + __pyx_t_10 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_10 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 845, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 843, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 845, __pyx_L1_error) (__pyx_v_vertices[__pyx_t_11]).position.y = __pyx_t_10; - /* "pygame/_sdl2/video.pyx":844 + /* "pygame/_sdl2/video.pyx":846 * vertices[i].position.x = xy[0] * vertices[i].position.y = xy[1] * vertices[i].color.r = r_mod * mod[0] # <<<<<<<<<<<<<< * vertices[i].color.g = g_mod * mod[1] * vertices[i].color.b = b_mod * mod[2] */ - __pyx_t_3 = PyFloat_FromDouble(__pyx_v_r_mod); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 844, __pyx_L1_error) + __pyx_t_3 = PyFloat_FromDouble(__pyx_v_r_mod); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 846, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_mod, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 844, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_mod, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 846, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = PyNumber_Multiply(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 844, __pyx_L1_error) + __pyx_t_6 = PyNumber_Multiply(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 846, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_12 = __Pyx_PyInt_As_Uint8(__pyx_t_6); if (unlikely((__pyx_t_12 == ((Uint8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 844, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyInt_As_Uint8(__pyx_t_6); if (unlikely((__pyx_t_12 == ((Uint8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 846, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 844, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 846, __pyx_L1_error) (__pyx_v_vertices[__pyx_t_11]).color.r = __pyx_t_12; - /* "pygame/_sdl2/video.pyx":845 + /* "pygame/_sdl2/video.pyx":847 * vertices[i].position.y = xy[1] * vertices[i].color.r = r_mod * mod[0] * vertices[i].color.g = g_mod * mod[1] # <<<<<<<<<<<<<< * vertices[i].color.b = b_mod * mod[2] * vertices[i].color.a = a_mod * mod[3] if len(mod) > 3 else _a_mod */ - __pyx_t_6 = PyFloat_FromDouble(__pyx_v_g_mod); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 845, __pyx_L1_error) + __pyx_t_6 = PyFloat_FromDouble(__pyx_v_g_mod); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 847, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_mod, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 845, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_mod, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 847, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyNumber_Multiply(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 845, __pyx_L1_error) + __pyx_t_3 = PyNumber_Multiply(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 847, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_12 = __Pyx_PyInt_As_Uint8(__pyx_t_3); if (unlikely((__pyx_t_12 == ((Uint8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 845, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyInt_As_Uint8(__pyx_t_3); if (unlikely((__pyx_t_12 == ((Uint8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 847, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 845, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 847, __pyx_L1_error) (__pyx_v_vertices[__pyx_t_11]).color.g = __pyx_t_12; - /* "pygame/_sdl2/video.pyx":846 + /* "pygame/_sdl2/video.pyx":848 * vertices[i].color.r = r_mod * mod[0] * vertices[i].color.g = g_mod * mod[1] * vertices[i].color.b = b_mod * mod[2] # <<<<<<<<<<<<<< * vertices[i].color.a = a_mod * mod[3] if len(mod) > 3 else _a_mod * vertices[i].tex_coord.x = uv[0] */ - __pyx_t_3 = PyFloat_FromDouble(__pyx_v_b_mod); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 846, __pyx_L1_error) + __pyx_t_3 = PyFloat_FromDouble(__pyx_v_b_mod); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 848, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_mod, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 846, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_mod, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 848, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = PyNumber_Multiply(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 846, __pyx_L1_error) + __pyx_t_6 = PyNumber_Multiply(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 848, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_12 = __Pyx_PyInt_As_Uint8(__pyx_t_6); if (unlikely((__pyx_t_12 == ((Uint8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 846, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyInt_As_Uint8(__pyx_t_6); if (unlikely((__pyx_t_12 == ((Uint8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 848, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 846, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 848, __pyx_L1_error) (__pyx_v_vertices[__pyx_t_11]).color.b = __pyx_t_12; - /* "pygame/_sdl2/video.pyx":847 + /* "pygame/_sdl2/video.pyx":849 * vertices[i].color.g = g_mod * mod[1] * vertices[i].color.b = b_mod * mod[2] * vertices[i].color.a = a_mod * mod[3] if len(mod) > 3 else _a_mod # <<<<<<<<<<<<<< * vertices[i].tex_coord.x = uv[0] * vertices[i].tex_coord.y = uv[1] */ - __pyx_t_11 = PyObject_Length(__pyx_v_mod); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 847, __pyx_L1_error) + __pyx_t_11 = PyObject_Length(__pyx_v_mod); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 849, __pyx_L1_error) if (((__pyx_t_11 > 3) != 0)) { - __pyx_t_6 = PyFloat_FromDouble(__pyx_v_a_mod); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 847, __pyx_L1_error) + __pyx_t_6 = PyFloat_FromDouble(__pyx_v_a_mod); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 849, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_mod, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 847, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_mod, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 849, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyNumber_Multiply(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 847, __pyx_L1_error) + __pyx_t_3 = PyNumber_Multiply(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 849, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_13 = __Pyx_PyInt_As_Uint8(__pyx_t_3); if (unlikely((__pyx_t_13 == ((Uint8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 847, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyInt_As_Uint8(__pyx_t_3); if (unlikely((__pyx_t_13 == ((Uint8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 849, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_12 = __pyx_t_13; } else { __pyx_t_12 = __pyx_v__a_mod; } - __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 847, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 849, __pyx_L1_error) (__pyx_v_vertices[__pyx_t_11]).color.a = __pyx_t_12; - /* "pygame/_sdl2/video.pyx":848 + /* "pygame/_sdl2/video.pyx":850 * vertices[i].color.b = b_mod * mod[2] * vertices[i].color.a = a_mod * mod[3] if len(mod) > 3 else _a_mod * vertices[i].tex_coord.x = uv[0] # <<<<<<<<<<<<<< * vertices[i].tex_coord.y = uv[1] * */ - __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_uv, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 848, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_uv, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 850, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_10 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_10 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 848, __pyx_L1_error) + __pyx_t_10 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_10 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 850, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 848, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 850, __pyx_L1_error) (__pyx_v_vertices[__pyx_t_11]).tex_coord.x = __pyx_t_10; - /* "pygame/_sdl2/video.pyx":849 + /* "pygame/_sdl2/video.pyx":851 * vertices[i].color.a = a_mod * mod[3] if len(mod) > 3 else _a_mod * vertices[i].tex_coord.x = uv[0] * vertices[i].tex_coord.y = uv[1] # <<<<<<<<<<<<<< * * cdef int res = SDL_RenderGeometry(self.renderer._renderer, self._tex, vertices, 3, NULL, 0) */ - __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_uv, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 849, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_uv, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 851, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_10 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_10 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 849, __pyx_L1_error) + __pyx_t_10 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_10 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 851, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 849, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 851, __pyx_L1_error) (__pyx_v_vertices[__pyx_t_11]).tex_coord.y = __pyx_t_10; - /* "pygame/_sdl2/video.pyx":838 + /* "pygame/_sdl2/video.pyx":840 * * cdef SDL_Vertex vertices[3] * for i, vert in enumerate(((p1_xy, p1_mod, p1_uv), # <<<<<<<<<<<<<< @@ -11849,7 +11907,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_12draw_triangle(struct __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sdl2/video.pyx":851 + /* "pygame/_sdl2/video.pyx":853 * vertices[i].tex_coord.y = uv[1] * * cdef int res = SDL_RenderGeometry(self.renderer._renderer, self._tex, vertices, 3, NULL, 0) # <<<<<<<<<<<<<< @@ -11858,7 +11916,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_12draw_triangle(struct */ __pyx_v_res = SDL_RenderGeometry(__pyx_v_self->renderer->_renderer, __pyx_v_self->_tex, __pyx_v_vertices, 3, NULL, 0); - /* "pygame/_sdl2/video.pyx":852 + /* "pygame/_sdl2/video.pyx":854 * * cdef int res = SDL_RenderGeometry(self.renderer._renderer, self._tex, vertices, 3, NULL, 0) * if res < 0: # <<<<<<<<<<<<<< @@ -11868,14 +11926,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_12draw_triangle(struct __pyx_t_1 = ((__pyx_v_res < 0) != 0); if (unlikely(__pyx_t_1)) { - /* "pygame/_sdl2/video.pyx":853 + /* "pygame/_sdl2/video.pyx":855 * cdef int res = SDL_RenderGeometry(self.renderer._renderer, self._tex, vertices, 3, NULL, 0) * if res < 0: * raise error() # <<<<<<<<<<<<<< * * def draw_quad(self, p1_xy, p2_xy, p3_xy, p4_xy, */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_error); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 853, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_error); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 855, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { @@ -11889,14 +11947,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_12draw_triangle(struct } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_5); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 853, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 855, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 853, __pyx_L1_error) + __PYX_ERR(0, 855, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":852 + /* "pygame/_sdl2/video.pyx":854 * * cdef int res = SDL_RenderGeometry(self.renderer._renderer, self._tex, vertices, 3, NULL, 0) * if res < 0: # <<<<<<<<<<<<<< @@ -11905,7 +11963,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_12draw_triangle(struct */ } - /* "pygame/_sdl2/video.pyx":810 + /* "pygame/_sdl2/video.pyx":812 * flip_x, flip_y) * * def draw_triangle(self, p1_xy, p2_xy, p3_xy, # <<<<<<<<<<<<<< @@ -11936,7 +11994,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_12draw_triangle(struct return __pyx_r; } -/* "pygame/_sdl2/video.pyx":855 +/* "pygame/_sdl2/video.pyx":857 * raise error() * * def draw_quad(self, p1_xy, p2_xy, p3_xy, p4_xy, # <<<<<<<<<<<<<< @@ -11970,7 +12028,7 @@ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7Texture_15draw_quad(PyObject *_ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_p1_xy,&__pyx_n_s_p2_xy,&__pyx_n_s_p3_xy,&__pyx_n_s_p4_xy,&__pyx_n_s_p1_uv,&__pyx_n_s_p2_uv,&__pyx_n_s_p3_uv,&__pyx_n_s_p4_uv,&__pyx_n_s_p1_mod,&__pyx_n_s_p2_mod,&__pyx_n_s_p3_mod,&__pyx_n_s_p4_mod,0}; PyObject* values[12] = {0,0,0,0,0,0,0,0,0,0,0,0}; - /* "pygame/_sdl2/video.pyx":856 + /* "pygame/_sdl2/video.pyx":858 * * def draw_quad(self, p1_xy, p2_xy, p3_xy, p4_xy, * p1_uv=(0.0, 0.0), p2_uv=(1.0, 0.0), p3_uv=(1.0, 1.0), p4_uv=(0.0, 1.0), # <<<<<<<<<<<<<< @@ -11982,7 +12040,7 @@ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7Texture_15draw_quad(PyObject *_ values[6] = ((PyObject *)__pyx_tuple__17); values[7] = ((PyObject *)__pyx_tuple__18); - /* "pygame/_sdl2/video.pyx":857 + /* "pygame/_sdl2/video.pyx":859 * def draw_quad(self, p1_xy, p2_xy, p3_xy, p4_xy, * p1_uv=(0.0, 0.0), p2_uv=(1.0, 0.0), p3_uv=(1.0, 1.0), p4_uv=(0.0, 1.0), * p1_mod=(255, 255, 255, 255), p2_mod=(255, 255, 255, 255), # <<<<<<<<<<<<<< @@ -11992,7 +12050,7 @@ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7Texture_15draw_quad(PyObject *_ values[8] = ((PyObject *)__pyx_tuple__19); values[9] = ((PyObject *)__pyx_tuple__19); - /* "pygame/_sdl2/video.pyx":858 + /* "pygame/_sdl2/video.pyx":860 * p1_uv=(0.0, 0.0), p2_uv=(1.0, 0.0), p3_uv=(1.0, 1.0), p4_uv=(0.0, 1.0), * p1_mod=(255, 255, 255, 255), p2_mod=(255, 255, 255, 255), * p3_mod=(255, 255, 255, 255), p4_mod=(255, 255, 255, 255)): # <<<<<<<<<<<<<< @@ -12041,19 +12099,19 @@ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7Texture_15draw_quad(PyObject *_ case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_p2_xy)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("draw_quad", 0, 4, 12, 1); __PYX_ERR(0, 855, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("draw_quad", 0, 4, 12, 1); __PYX_ERR(0, 857, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_p3_xy)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("draw_quad", 0, 4, 12, 2); __PYX_ERR(0, 855, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("draw_quad", 0, 4, 12, 2); __PYX_ERR(0, 857, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_p4_xy)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("draw_quad", 0, 4, 12, 3); __PYX_ERR(0, 855, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("draw_quad", 0, 4, 12, 3); __PYX_ERR(0, 857, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: @@ -12105,7 +12163,7 @@ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7Texture_15draw_quad(PyObject *_ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "draw_quad") < 0)) __PYX_ERR(0, 855, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "draw_quad") < 0)) __PYX_ERR(0, 857, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -12148,7 +12206,7 @@ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7Texture_15draw_quad(PyObject *_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("draw_quad", 0, 4, 12, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 855, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("draw_quad", 0, 4, 12, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 857, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pygame._sdl2.video.Texture.draw_quad", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -12156,7 +12214,7 @@ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7Texture_15draw_quad(PyObject *_ __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_7Texture_14draw_quad(((struct __pyx_obj_6pygame_5_sdl2_5video_Texture *)__pyx_v_self), __pyx_v_p1_xy, __pyx_v_p2_xy, __pyx_v_p3_xy, __pyx_v_p4_xy, __pyx_v_p1_uv, __pyx_v_p2_uv, __pyx_v_p3_uv, __pyx_v_p4_uv, __pyx_v_p1_mod, __pyx_v_p2_mod, __pyx_v_p3_mod, __pyx_v_p4_mod); - /* "pygame/_sdl2/video.pyx":855 + /* "pygame/_sdl2/video.pyx":857 * raise error() * * def draw_quad(self, p1_xy, p2_xy, p3_xy, p4_xy, # <<<<<<<<<<<<<< @@ -12207,7 +12265,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_14draw_quad(struct __py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("draw_quad", 0); - /* "pygame/_sdl2/video.pyx":874 + /* "pygame/_sdl2/video.pyx":876 * :param p4_mod: The fourth vertex color modulation. * """ * if not SDL_VERSION_ATLEAST(2, 0, 18): # <<<<<<<<<<<<<< @@ -12217,14 +12275,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_14draw_quad(struct __py __pyx_t_1 = ((!(SDL_VERSION_ATLEAST(2, 0, 18) != 0)) != 0); if (unlikely(__pyx_t_1)) { - /* "pygame/_sdl2/video.pyx":875 + /* "pygame/_sdl2/video.pyx":877 * """ * if not SDL_VERSION_ATLEAST(2, 0, 18): * raise error("draw_quad requires SDL 2.0.18 or newer") # <<<<<<<<<<<<<< * * cdef Uint8 _r_mod, _g_mod, _b_mod, _a_mod */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 875, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 877, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { @@ -12238,14 +12296,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_14draw_quad(struct __py } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_s_draw_quad_requires_SDL_2_0_18_or) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_s_draw_quad_requires_SDL_2_0_18_or); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 875, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 877, __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, 875, __pyx_L1_error) + __PYX_ERR(0, 877, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":874 + /* "pygame/_sdl2/video.pyx":876 * :param p4_mod: The fourth vertex color modulation. * """ * if not SDL_VERSION_ATLEAST(2, 0, 18): # <<<<<<<<<<<<<< @@ -12254,7 +12312,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_14draw_quad(struct __py */ } - /* "pygame/_sdl2/video.pyx":878 + /* "pygame/_sdl2/video.pyx":880 * * cdef Uint8 _r_mod, _g_mod, _b_mod, _a_mod * SDL_GetTextureColorMod(self._tex, &_r_mod, &_g_mod, &_b_mod) # <<<<<<<<<<<<<< @@ -12263,7 +12321,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_14draw_quad(struct __py */ (void)(SDL_GetTextureColorMod(__pyx_v_self->_tex, (&__pyx_v__r_mod), (&__pyx_v__g_mod), (&__pyx_v__b_mod))); - /* "pygame/_sdl2/video.pyx":879 + /* "pygame/_sdl2/video.pyx":881 * cdef Uint8 _r_mod, _g_mod, _b_mod, _a_mod * SDL_GetTextureColorMod(self._tex, &_r_mod, &_g_mod, &_b_mod) * SDL_GetTextureAlphaMod(self._tex, &_a_mod) # <<<<<<<<<<<<<< @@ -12272,7 +12330,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_14draw_quad(struct __py */ (void)(SDL_GetTextureAlphaMod(__pyx_v_self->_tex, (&__pyx_v__a_mod))); - /* "pygame/_sdl2/video.pyx":881 + /* "pygame/_sdl2/video.pyx":883 * SDL_GetTextureAlphaMod(self._tex, &_a_mod) * * cdef float r_mod = float(_r_mod) / 255.0 # <<<<<<<<<<<<<< @@ -12281,7 +12339,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_14draw_quad(struct __py */ __pyx_v_r_mod = (((double)__pyx_v__r_mod) / 255.0); - /* "pygame/_sdl2/video.pyx":882 + /* "pygame/_sdl2/video.pyx":884 * * cdef float r_mod = float(_r_mod) / 255.0 * cdef float g_mod = float(_g_mod) / 255.0 # <<<<<<<<<<<<<< @@ -12290,7 +12348,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_14draw_quad(struct __py */ __pyx_v_g_mod = (((double)__pyx_v__g_mod) / 255.0); - /* "pygame/_sdl2/video.pyx":883 + /* "pygame/_sdl2/video.pyx":885 * cdef float r_mod = float(_r_mod) / 255.0 * cdef float g_mod = float(_g_mod) / 255.0 * cdef float b_mod = float(_b_mod) / 255.0 # <<<<<<<<<<<<<< @@ -12299,7 +12357,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_14draw_quad(struct __py */ __pyx_v_b_mod = (((double)__pyx_v__b_mod) / 255.0); - /* "pygame/_sdl2/video.pyx":884 + /* "pygame/_sdl2/video.pyx":886 * cdef float g_mod = float(_g_mod) / 255.0 * cdef float b_mod = float(_b_mod) / 255.0 * cdef float a_mod = float(_a_mod) / 255.0 # <<<<<<<<<<<<<< @@ -12308,7 +12366,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_14draw_quad(struct __py */ __pyx_v_a_mod = (((double)__pyx_v__a_mod) / 255.0); - /* "pygame/_sdl2/video.pyx":887 + /* "pygame/_sdl2/video.pyx":889 * * cdef SDL_Vertex vertices[6] * for i, vert in enumerate(((p1_xy, p1_mod, p1_uv), # <<<<<<<<<<<<<< @@ -12317,7 +12375,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_14draw_quad(struct __py */ __Pyx_INCREF(__pyx_int_0); __pyx_t_2 = __pyx_int_0; - __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 887, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 889, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_p1_xy); __Pyx_GIVEREF(__pyx_v_p1_xy); @@ -12329,14 +12387,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_14draw_quad(struct __py __Pyx_GIVEREF(__pyx_v_p1_uv); PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_p1_uv); - /* "pygame/_sdl2/video.pyx":888 + /* "pygame/_sdl2/video.pyx":890 * cdef SDL_Vertex vertices[6] * for i, vert in enumerate(((p1_xy, p1_mod, p1_uv), * (p2_xy, p2_mod, p2_uv), # <<<<<<<<<<<<<< * (p3_xy, p3_mod, p3_uv), * (p3_xy, p3_mod, p3_uv), */ - __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 888, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 890, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_p2_xy); __Pyx_GIVEREF(__pyx_v_p2_xy); @@ -12348,14 +12406,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_14draw_quad(struct __py __Pyx_GIVEREF(__pyx_v_p2_uv); PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_p2_uv); - /* "pygame/_sdl2/video.pyx":889 + /* "pygame/_sdl2/video.pyx":891 * for i, vert in enumerate(((p1_xy, p1_mod, p1_uv), * (p2_xy, p2_mod, p2_uv), * (p3_xy, p3_mod, p3_uv), # <<<<<<<<<<<<<< * (p3_xy, p3_mod, p3_uv), * (p4_xy, p4_mod, p4_uv), */ - __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 889, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 891, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_p3_xy); __Pyx_GIVEREF(__pyx_v_p3_xy); @@ -12367,14 +12425,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_14draw_quad(struct __py __Pyx_GIVEREF(__pyx_v_p3_uv); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_p3_uv); - /* "pygame/_sdl2/video.pyx":890 + /* "pygame/_sdl2/video.pyx":892 * (p2_xy, p2_mod, p2_uv), * (p3_xy, p3_mod, p3_uv), * (p3_xy, p3_mod, p3_uv), # <<<<<<<<<<<<<< * (p4_xy, p4_mod, p4_uv), * (p1_xy, p1_mod, p1_uv))): */ - __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 890, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 892, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_p3_xy); __Pyx_GIVEREF(__pyx_v_p3_xy); @@ -12386,14 +12444,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_14draw_quad(struct __py __Pyx_GIVEREF(__pyx_v_p3_uv); PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_p3_uv); - /* "pygame/_sdl2/video.pyx":891 + /* "pygame/_sdl2/video.pyx":893 * (p3_xy, p3_mod, p3_uv), * (p3_xy, p3_mod, p3_uv), * (p4_xy, p4_mod, p4_uv), # <<<<<<<<<<<<<< * (p1_xy, p1_mod, p1_uv))): * xy, mod, uv = vert */ - __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 891, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 893, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_v_p4_xy); __Pyx_GIVEREF(__pyx_v_p4_xy); @@ -12405,14 +12463,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_14draw_quad(struct __py __Pyx_GIVEREF(__pyx_v_p4_uv); PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_v_p4_uv); - /* "pygame/_sdl2/video.pyx":892 + /* "pygame/_sdl2/video.pyx":894 * (p3_xy, p3_mod, p3_uv), * (p4_xy, p4_mod, p4_uv), * (p1_xy, p1_mod, p1_uv))): # <<<<<<<<<<<<<< * xy, mod, uv = vert * vertices[i].position.x = xy[0] */ - __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 892, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 894, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_p1_xy); __Pyx_GIVEREF(__pyx_v_p1_xy); @@ -12424,14 +12482,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_14draw_quad(struct __py __Pyx_GIVEREF(__pyx_v_p1_uv); PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_v_p1_uv); - /* "pygame/_sdl2/video.pyx":887 + /* "pygame/_sdl2/video.pyx":889 * * cdef SDL_Vertex vertices[6] * for i, vert in enumerate(((p1_xy, p1_mod, p1_uv), # <<<<<<<<<<<<<< * (p2_xy, p2_mod, p2_uv), * (p3_xy, p3_mod, p3_uv), */ - __pyx_t_9 = PyTuple_New(6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 887, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 889, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_3); @@ -12456,22 +12514,22 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_14draw_quad(struct __py for (;;) { if (__pyx_t_10 >= 6) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_10); __Pyx_INCREF(__pyx_t_9); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 887, __pyx_L1_error) + __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_10); __Pyx_INCREF(__pyx_t_9); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 889, __pyx_L1_error) #else - __pyx_t_9 = PySequence_ITEM(__pyx_t_8, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 887, __pyx_L1_error) + __pyx_t_9 = PySequence_ITEM(__pyx_t_8, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 889, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); #endif __Pyx_XDECREF_SET(__pyx_v_vert, __pyx_t_9); __pyx_t_9 = 0; __Pyx_INCREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2); - __pyx_t_9 = __Pyx_PyInt_AddObjC(__pyx_t_2, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 887, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyInt_AddObjC(__pyx_t_2, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 889, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = __pyx_t_9; __pyx_t_9 = 0; - /* "pygame/_sdl2/video.pyx":893 + /* "pygame/_sdl2/video.pyx":895 * (p4_xy, p4_mod, p4_uv), * (p1_xy, p1_mod, p1_uv))): * xy, mod, uv = vert # <<<<<<<<<<<<<< @@ -12484,7 +12542,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_14draw_quad(struct __py if (unlikely(size != 3)) { if (size > 3) __Pyx_RaiseTooManyValuesError(3); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 893, __pyx_L1_error) + __PYX_ERR(0, 895, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -12500,16 +12558,16 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_14draw_quad(struct __py __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(__pyx_t_6); #else - __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 893, __pyx_L1_error) + __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 895, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 893, __pyx_L1_error) + __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 895, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 893, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 895, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif } else { Py_ssize_t index = -1; - __pyx_t_5 = PyObject_GetIter(__pyx_v_vert); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 893, __pyx_L1_error) + __pyx_t_5 = PyObject_GetIter(__pyx_v_vert); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 895, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_11 = Py_TYPE(__pyx_t_5)->tp_iternext; index = 0; __pyx_t_9 = __pyx_t_11(__pyx_t_5); if (unlikely(!__pyx_t_9)) goto __pyx_L6_unpacking_failed; @@ -12518,7 +12576,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_14draw_quad(struct __py __Pyx_GOTREF(__pyx_t_7); index = 2; __pyx_t_6 = __pyx_t_11(__pyx_t_5); if (unlikely(!__pyx_t_6)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_5), 3) < 0) __PYX_ERR(0, 893, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_5), 3) < 0) __PYX_ERR(0, 895, __pyx_L1_error) __pyx_t_11 = NULL; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L7_unpacking_done; @@ -12526,7 +12584,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_14draw_quad(struct __py __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_11 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 893, __pyx_L1_error) + __PYX_ERR(0, 895, __pyx_L1_error) __pyx_L7_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_xy, __pyx_t_9); @@ -12536,149 +12594,149 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_14draw_quad(struct __py __Pyx_XDECREF_SET(__pyx_v_uv, __pyx_t_6); __pyx_t_6 = 0; - /* "pygame/_sdl2/video.pyx":894 + /* "pygame/_sdl2/video.pyx":896 * (p1_xy, p1_mod, p1_uv))): * xy, mod, uv = vert * vertices[i].position.x = xy[0] # <<<<<<<<<<<<<< * vertices[i].position.y = xy[1] * vertices[i].color.r = r_mod * mod[0] */ - __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_xy, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 894, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_xy, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 896, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_12 = __pyx_PyFloat_AsFloat(__pyx_t_6); if (unlikely((__pyx_t_12 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 894, __pyx_L1_error) + __pyx_t_12 = __pyx_PyFloat_AsFloat(__pyx_t_6); if (unlikely((__pyx_t_12 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 896, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_13 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_13 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 894, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_13 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 896, __pyx_L1_error) (__pyx_v_vertices[__pyx_t_13]).position.x = __pyx_t_12; - /* "pygame/_sdl2/video.pyx":895 + /* "pygame/_sdl2/video.pyx":897 * xy, mod, uv = vert * vertices[i].position.x = xy[0] * vertices[i].position.y = xy[1] # <<<<<<<<<<<<<< * vertices[i].color.r = r_mod * mod[0] * vertices[i].color.g = g_mod * mod[1] */ - __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_xy, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 895, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_xy, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 897, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_12 = __pyx_PyFloat_AsFloat(__pyx_t_6); if (unlikely((__pyx_t_12 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 895, __pyx_L1_error) + __pyx_t_12 = __pyx_PyFloat_AsFloat(__pyx_t_6); if (unlikely((__pyx_t_12 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 897, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_13 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_13 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 895, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_13 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 897, __pyx_L1_error) (__pyx_v_vertices[__pyx_t_13]).position.y = __pyx_t_12; - /* "pygame/_sdl2/video.pyx":896 + /* "pygame/_sdl2/video.pyx":898 * vertices[i].position.x = xy[0] * vertices[i].position.y = xy[1] * vertices[i].color.r = r_mod * mod[0] # <<<<<<<<<<<<<< * vertices[i].color.g = g_mod * mod[1] * vertices[i].color.b = b_mod * mod[2] */ - __pyx_t_6 = PyFloat_FromDouble(__pyx_v_r_mod); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 896, __pyx_L1_error) + __pyx_t_6 = PyFloat_FromDouble(__pyx_v_r_mod); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 898, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_mod, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 896, __pyx_L1_error) + __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_mod, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 898, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_9 = PyNumber_Multiply(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 896, __pyx_L1_error) + __pyx_t_9 = PyNumber_Multiply(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 898, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_14 = __Pyx_PyInt_As_Uint8(__pyx_t_9); if (unlikely((__pyx_t_14 == ((Uint8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 896, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyInt_As_Uint8(__pyx_t_9); if (unlikely((__pyx_t_14 == ((Uint8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 898, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_13 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_13 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 896, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_13 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 898, __pyx_L1_error) (__pyx_v_vertices[__pyx_t_13]).color.r = __pyx_t_14; - /* "pygame/_sdl2/video.pyx":897 + /* "pygame/_sdl2/video.pyx":899 * vertices[i].position.y = xy[1] * vertices[i].color.r = r_mod * mod[0] * vertices[i].color.g = g_mod * mod[1] # <<<<<<<<<<<<<< * vertices[i].color.b = b_mod * mod[2] * vertices[i].color.a = a_mod * mod[3] if len(mod) > 3 else _a_mod */ - __pyx_t_9 = PyFloat_FromDouble(__pyx_v_g_mod); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 897, __pyx_L1_error) + __pyx_t_9 = PyFloat_FromDouble(__pyx_v_g_mod); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 899, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_mod, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 897, __pyx_L1_error) + __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_mod, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 899, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = PyNumber_Multiply(__pyx_t_9, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 897, __pyx_L1_error) + __pyx_t_6 = PyNumber_Multiply(__pyx_t_9, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 899, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_14 = __Pyx_PyInt_As_Uint8(__pyx_t_6); if (unlikely((__pyx_t_14 == ((Uint8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 897, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyInt_As_Uint8(__pyx_t_6); if (unlikely((__pyx_t_14 == ((Uint8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 899, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_13 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_13 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 897, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_13 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 899, __pyx_L1_error) (__pyx_v_vertices[__pyx_t_13]).color.g = __pyx_t_14; - /* "pygame/_sdl2/video.pyx":898 + /* "pygame/_sdl2/video.pyx":900 * vertices[i].color.r = r_mod * mod[0] * vertices[i].color.g = g_mod * mod[1] * vertices[i].color.b = b_mod * mod[2] # <<<<<<<<<<<<<< * vertices[i].color.a = a_mod * mod[3] if len(mod) > 3 else _a_mod * vertices[i].tex_coord.x = uv[0] */ - __pyx_t_6 = PyFloat_FromDouble(__pyx_v_b_mod); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 898, __pyx_L1_error) + __pyx_t_6 = PyFloat_FromDouble(__pyx_v_b_mod); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 900, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_mod, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 898, __pyx_L1_error) + __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_mod, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 900, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_9 = PyNumber_Multiply(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 898, __pyx_L1_error) + __pyx_t_9 = PyNumber_Multiply(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 900, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_14 = __Pyx_PyInt_As_Uint8(__pyx_t_9); if (unlikely((__pyx_t_14 == ((Uint8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 898, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyInt_As_Uint8(__pyx_t_9); if (unlikely((__pyx_t_14 == ((Uint8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 900, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_13 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_13 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 898, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_13 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 900, __pyx_L1_error) (__pyx_v_vertices[__pyx_t_13]).color.b = __pyx_t_14; - /* "pygame/_sdl2/video.pyx":899 + /* "pygame/_sdl2/video.pyx":901 * vertices[i].color.g = g_mod * mod[1] * vertices[i].color.b = b_mod * mod[2] * vertices[i].color.a = a_mod * mod[3] if len(mod) > 3 else _a_mod # <<<<<<<<<<<<<< * vertices[i].tex_coord.x = uv[0] * vertices[i].tex_coord.y = uv[1] */ - __pyx_t_13 = PyObject_Length(__pyx_v_mod); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 899, __pyx_L1_error) + __pyx_t_13 = PyObject_Length(__pyx_v_mod); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 901, __pyx_L1_error) if (((__pyx_t_13 > 3) != 0)) { - __pyx_t_9 = PyFloat_FromDouble(__pyx_v_a_mod); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 899, __pyx_L1_error) + __pyx_t_9 = PyFloat_FromDouble(__pyx_v_a_mod); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 901, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_mod, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 899, __pyx_L1_error) + __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_mod, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 901, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = PyNumber_Multiply(__pyx_t_9, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 899, __pyx_L1_error) + __pyx_t_6 = PyNumber_Multiply(__pyx_t_9, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 901, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_15 = __Pyx_PyInt_As_Uint8(__pyx_t_6); if (unlikely((__pyx_t_15 == ((Uint8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 899, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyInt_As_Uint8(__pyx_t_6); if (unlikely((__pyx_t_15 == ((Uint8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 901, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_14 = __pyx_t_15; } else { __pyx_t_14 = __pyx_v__a_mod; } - __pyx_t_13 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_13 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 899, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_13 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 901, __pyx_L1_error) (__pyx_v_vertices[__pyx_t_13]).color.a = __pyx_t_14; - /* "pygame/_sdl2/video.pyx":900 + /* "pygame/_sdl2/video.pyx":902 * vertices[i].color.b = b_mod * mod[2] * vertices[i].color.a = a_mod * mod[3] if len(mod) > 3 else _a_mod * vertices[i].tex_coord.x = uv[0] # <<<<<<<<<<<<<< * vertices[i].tex_coord.y = uv[1] * */ - __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_uv, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 900, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_uv, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 902, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_12 = __pyx_PyFloat_AsFloat(__pyx_t_6); if (unlikely((__pyx_t_12 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 900, __pyx_L1_error) + __pyx_t_12 = __pyx_PyFloat_AsFloat(__pyx_t_6); if (unlikely((__pyx_t_12 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 902, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_13 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_13 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 900, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_13 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 902, __pyx_L1_error) (__pyx_v_vertices[__pyx_t_13]).tex_coord.x = __pyx_t_12; - /* "pygame/_sdl2/video.pyx":901 + /* "pygame/_sdl2/video.pyx":903 * vertices[i].color.a = a_mod * mod[3] if len(mod) > 3 else _a_mod * vertices[i].tex_coord.x = uv[0] * vertices[i].tex_coord.y = uv[1] # <<<<<<<<<<<<<< * * cdef int res = SDL_RenderGeometry(self.renderer._renderer, self._tex, vertices, 6, NULL, 0) */ - __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_uv, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 901, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_uv, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 903, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_12 = __pyx_PyFloat_AsFloat(__pyx_t_6); if (unlikely((__pyx_t_12 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 901, __pyx_L1_error) + __pyx_t_12 = __pyx_PyFloat_AsFloat(__pyx_t_6); if (unlikely((__pyx_t_12 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 903, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_13 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_13 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 901, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_13 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 903, __pyx_L1_error) (__pyx_v_vertices[__pyx_t_13]).tex_coord.y = __pyx_t_12; - /* "pygame/_sdl2/video.pyx":887 + /* "pygame/_sdl2/video.pyx":889 * * cdef SDL_Vertex vertices[6] * for i, vert in enumerate(((p1_xy, p1_mod, p1_uv), # <<<<<<<<<<<<<< @@ -12689,7 +12747,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_14draw_quad(struct __py __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sdl2/video.pyx":903 + /* "pygame/_sdl2/video.pyx":905 * vertices[i].tex_coord.y = uv[1] * * cdef int res = SDL_RenderGeometry(self.renderer._renderer, self._tex, vertices, 6, NULL, 0) # <<<<<<<<<<<<<< @@ -12698,7 +12756,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_14draw_quad(struct __py */ __pyx_v_res = SDL_RenderGeometry(__pyx_v_self->renderer->_renderer, __pyx_v_self->_tex, __pyx_v_vertices, 6, NULL, 0); - /* "pygame/_sdl2/video.pyx":904 + /* "pygame/_sdl2/video.pyx":906 * * cdef int res = SDL_RenderGeometry(self.renderer._renderer, self._tex, vertices, 6, NULL, 0) * if res < 0: # <<<<<<<<<<<<<< @@ -12708,14 +12766,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_14draw_quad(struct __py __pyx_t_1 = ((__pyx_v_res < 0) != 0); if (unlikely(__pyx_t_1)) { - /* "pygame/_sdl2/video.pyx":905 + /* "pygame/_sdl2/video.pyx":907 * cdef int res = SDL_RenderGeometry(self.renderer._renderer, self._tex, vertices, 6, NULL, 0) * if res < 0: * raise error() # <<<<<<<<<<<<<< * * def update(self, surface, area=None): */ - __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_error); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 905, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_error); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 907, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) { @@ -12729,14 +12787,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_14draw_quad(struct __py } __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_8); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 905, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 907, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 905, __pyx_L1_error) + __PYX_ERR(0, 907, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":904 + /* "pygame/_sdl2/video.pyx":906 * * cdef int res = SDL_RenderGeometry(self.renderer._renderer, self._tex, vertices, 6, NULL, 0) * if res < 0: # <<<<<<<<<<<<<< @@ -12745,7 +12803,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_14draw_quad(struct __py */ } - /* "pygame/_sdl2/video.pyx":855 + /* "pygame/_sdl2/video.pyx":857 * raise error() * * def draw_quad(self, p1_xy, p2_xy, p3_xy, p4_xy, # <<<<<<<<<<<<<< @@ -12778,7 +12836,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_14draw_quad(struct __py return __pyx_r; } -/* "pygame/_sdl2/video.pyx":907 +/* "pygame/_sdl2/video.pyx":909 * raise error() * * def update(self, surface, area=None): # <<<<<<<<<<<<<< @@ -12826,7 +12884,7 @@ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7Texture_17update(PyObject *__py } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "update") < 0)) __PYX_ERR(0, 907, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "update") < 0)) __PYX_ERR(0, 909, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -12842,7 +12900,7 @@ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_7Texture_17update(PyObject *__py } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("update", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 907, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("update", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 909, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pygame._sdl2.video.Texture.update", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -12877,7 +12935,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_16update(struct __pyx_o int __pyx_clineno = 0; __Pyx_RefNannySetupContext("update", 0); - /* "pygame/_sdl2/video.pyx":926 + /* "pygame/_sdl2/video.pyx":928 * """ * * if not pgSurface_Check(surface): # <<<<<<<<<<<<<< @@ -12887,20 +12945,20 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_16update(struct __pyx_o __pyx_t_1 = ((!(pgSurface_Check(__pyx_v_surface) != 0)) != 0); if (unlikely(__pyx_t_1)) { - /* "pygame/_sdl2/video.pyx":927 + /* "pygame/_sdl2/video.pyx":929 * * 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__21, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 927, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 929, __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, 927, __pyx_L1_error) + __PYX_ERR(0, 929, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":926 + /* "pygame/_sdl2/video.pyx":928 * """ * * if not pgSurface_Check(surface): # <<<<<<<<<<<<<< @@ -12909,7 +12967,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_16update(struct __pyx_o */ } - /* "pygame/_sdl2/video.pyx":930 + /* "pygame/_sdl2/video.pyx":932 * * cdef SDL_Rect rect * cdef SDL_Rect *rectptr = pgRect_FromObject(area, &rect) # <<<<<<<<<<<<<< @@ -12918,7 +12976,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_16update(struct __pyx_o */ __pyx_v_rectptr = pgRect_FromObject(__pyx_v_area, (&__pyx_v_rect)); - /* "pygame/_sdl2/video.pyx":931 + /* "pygame/_sdl2/video.pyx":933 * cdef SDL_Rect rect * cdef SDL_Rect *rectptr = pgRect_FromObject(area, &rect) * cdef SDL_Surface *surf = pgSurface_AsSurface(surface) # <<<<<<<<<<<<<< @@ -12927,7 +12985,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_16update(struct __pyx_o */ __pyx_v_surf = pgSurface_AsSurface(__pyx_v_surface); - /* "pygame/_sdl2/video.pyx":934 + /* "pygame/_sdl2/video.pyx":936 * * # For converting the surface, if needed * cdef SDL_Surface *converted_surf = NULL # <<<<<<<<<<<<<< @@ -12936,7 +12994,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_16update(struct __pyx_o */ __pyx_v_converted_surf = NULL; - /* "pygame/_sdl2/video.pyx":935 + /* "pygame/_sdl2/video.pyx":937 * # For converting the surface, if needed * cdef SDL_Surface *converted_surf = NULL * cdef SDL_PixelFormat *pixel_format = NULL # <<<<<<<<<<<<<< @@ -12945,7 +13003,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_16update(struct __pyx_o */ __pyx_v_pixel_format = NULL; - /* "pygame/_sdl2/video.pyx":938 + /* "pygame/_sdl2/video.pyx":940 * cdef SDL_BlendMode blend * * if rectptr == NULL and area is not None: # <<<<<<<<<<<<<< @@ -12964,20 +13022,20 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_16update(struct __pyx_o __pyx_L5_bool_binop_done:; if (unlikely(__pyx_t_1)) { - /* "pygame/_sdl2/video.pyx":939 + /* "pygame/_sdl2/video.pyx":941 * * 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__22, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 939, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 941, __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, 939, __pyx_L1_error) + __PYX_ERR(0, 941, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":938 + /* "pygame/_sdl2/video.pyx":940 * cdef SDL_BlendMode blend * * if rectptr == NULL and area is not None: # <<<<<<<<<<<<<< @@ -12986,7 +13044,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_16update(struct __pyx_o */ } - /* "pygame/_sdl2/video.pyx":942 + /* "pygame/_sdl2/video.pyx":944 * * cdef Uint32 format_ * if (SDL_QueryTexture(self._tex, &format_, NULL, NULL, NULL) != 0): # <<<<<<<<<<<<<< @@ -12996,14 +13054,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_16update(struct __pyx_o __pyx_t_1 = ((SDL_QueryTexture(__pyx_v_self->_tex, (&__pyx_v_format_), NULL, NULL, NULL) != 0) != 0); if (unlikely(__pyx_t_1)) { - /* "pygame/_sdl2/video.pyx":943 + /* "pygame/_sdl2/video.pyx":945 * cdef Uint32 format_ * if (SDL_QueryTexture(self._tex, &format_, NULL, NULL, NULL) != 0): * raise error() # <<<<<<<<<<<<<< * * cdef int res */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_error); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 943, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_error); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 945, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { @@ -13017,14 +13075,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_16update(struct __pyx_o } __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 943, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 945, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 943, __pyx_L1_error) + __PYX_ERR(0, 945, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":942 + /* "pygame/_sdl2/video.pyx":944 * * cdef Uint32 format_ * if (SDL_QueryTexture(self._tex, &format_, NULL, NULL, NULL) != 0): # <<<<<<<<<<<<<< @@ -13033,7 +13091,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_16update(struct __pyx_o */ } - /* "pygame/_sdl2/video.pyx":946 + /* "pygame/_sdl2/video.pyx":948 * * cdef int res * if format_ != surf.format.format: # <<<<<<<<<<<<<< @@ -13043,7 +13101,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_16update(struct __pyx_o __pyx_t_1 = ((__pyx_v_format_ != __pyx_v_surf->format->format) != 0); if (__pyx_t_1) { - /* "pygame/_sdl2/video.pyx":947 + /* "pygame/_sdl2/video.pyx":949 * cdef int res * if format_ != surf.format.format: * if (SDL_GetSurfaceBlendMode(surf, &blend) != 0): # <<<<<<<<<<<<<< @@ -13053,14 +13111,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_16update(struct __pyx_o __pyx_t_1 = ((SDL_GetSurfaceBlendMode(__pyx_v_surf, (&__pyx_v_blend)) != 0) != 0); if (unlikely(__pyx_t_1)) { - /* "pygame/_sdl2/video.pyx":948 + /* "pygame/_sdl2/video.pyx":950 * if format_ != surf.format.format: * if (SDL_GetSurfaceBlendMode(surf, &blend) != 0): * raise error() # <<<<<<<<<<<<<< * * pixel_format = SDL_AllocFormat(format_) */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_error); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 948, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_error); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 950, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { @@ -13074,14 +13132,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_16update(struct __pyx_o } __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 948, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 950, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 948, __pyx_L1_error) + __PYX_ERR(0, 950, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":947 + /* "pygame/_sdl2/video.pyx":949 * cdef int res * if format_ != surf.format.format: * if (SDL_GetSurfaceBlendMode(surf, &blend) != 0): # <<<<<<<<<<<<<< @@ -13090,7 +13148,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_16update(struct __pyx_o */ } - /* "pygame/_sdl2/video.pyx":950 + /* "pygame/_sdl2/video.pyx":952 * raise error() * * pixel_format = SDL_AllocFormat(format_) # <<<<<<<<<<<<<< @@ -13099,7 +13157,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_16update(struct __pyx_o */ __pyx_v_pixel_format = SDL_AllocFormat(__pyx_v_format_); - /* "pygame/_sdl2/video.pyx":951 + /* "pygame/_sdl2/video.pyx":953 * * pixel_format = SDL_AllocFormat(format_) * if (pixel_format == NULL): # <<<<<<<<<<<<<< @@ -13109,14 +13167,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_16update(struct __pyx_o __pyx_t_1 = ((__pyx_v_pixel_format == NULL) != 0); if (unlikely(__pyx_t_1)) { - /* "pygame/_sdl2/video.pyx":952 + /* "pygame/_sdl2/video.pyx":954 * pixel_format = SDL_AllocFormat(format_) * if (pixel_format == NULL): * raise error() # <<<<<<<<<<<<<< * * converted_surf = SDL_ConvertSurface(surf, pixel_format, 0) */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_error); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 952, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_error); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 954, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { @@ -13130,14 +13188,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_16update(struct __pyx_o } __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 952, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 954, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 952, __pyx_L1_error) + __PYX_ERR(0, 954, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":951 + /* "pygame/_sdl2/video.pyx":953 * * pixel_format = SDL_AllocFormat(format_) * if (pixel_format == NULL): # <<<<<<<<<<<<<< @@ -13146,7 +13204,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_16update(struct __pyx_o */ } - /* "pygame/_sdl2/video.pyx":954 + /* "pygame/_sdl2/video.pyx":956 * raise error() * * converted_surf = SDL_ConvertSurface(surf, pixel_format, 0) # <<<<<<<<<<<<<< @@ -13155,7 +13213,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_16update(struct __pyx_o */ __pyx_v_converted_surf = SDL_ConvertSurface(__pyx_v_surf, __pyx_v_pixel_format, 0); - /* "pygame/_sdl2/video.pyx":955 + /* "pygame/_sdl2/video.pyx":957 * * converted_surf = SDL_ConvertSurface(surf, pixel_format, 0) * if (SDL_SetSurfaceBlendMode(converted_surf, blend) != 0): # <<<<<<<<<<<<<< @@ -13165,7 +13223,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_16update(struct __pyx_o __pyx_t_1 = ((SDL_SetSurfaceBlendMode(__pyx_v_converted_surf, __pyx_v_blend) != 0) != 0); if (unlikely(__pyx_t_1)) { - /* "pygame/_sdl2/video.pyx":956 + /* "pygame/_sdl2/video.pyx":958 * converted_surf = SDL_ConvertSurface(surf, pixel_format, 0) * if (SDL_SetSurfaceBlendMode(converted_surf, blend) != 0): * SDL_FreeSurface(converted_surf) # <<<<<<<<<<<<<< @@ -13174,7 +13232,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_16update(struct __pyx_o */ SDL_FreeSurface(__pyx_v_converted_surf); - /* "pygame/_sdl2/video.pyx":957 + /* "pygame/_sdl2/video.pyx":959 * if (SDL_SetSurfaceBlendMode(converted_surf, blend) != 0): * SDL_FreeSurface(converted_surf) * SDL_FreeFormat(pixel_format) # <<<<<<<<<<<<<< @@ -13183,14 +13241,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_16update(struct __pyx_o */ SDL_FreeFormat(__pyx_v_pixel_format); - /* "pygame/_sdl2/video.pyx":958 + /* "pygame/_sdl2/video.pyx":960 * 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_5, __pyx_n_s_error); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 958, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_error); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 960, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { @@ -13204,14 +13262,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_16update(struct __pyx_o } __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 958, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 960, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 958, __pyx_L1_error) + __PYX_ERR(0, 960, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":955 + /* "pygame/_sdl2/video.pyx":957 * * converted_surf = SDL_ConvertSurface(surf, pixel_format, 0) * if (SDL_SetSurfaceBlendMode(converted_surf, blend) != 0): # <<<<<<<<<<<<<< @@ -13220,7 +13278,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_16update(struct __pyx_o */ } - /* "pygame/_sdl2/video.pyx":960 + /* "pygame/_sdl2/video.pyx":962 * raise error() * * res = SDL_UpdateTexture(self._tex, rectptr, converted_surf.pixels, converted_surf.pitch) # <<<<<<<<<<<<<< @@ -13229,7 +13287,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_16update(struct __pyx_o */ __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":961 + /* "pygame/_sdl2/video.pyx":963 * * res = SDL_UpdateTexture(self._tex, rectptr, converted_surf.pixels, converted_surf.pitch) * SDL_FreeSurface(converted_surf) # <<<<<<<<<<<<<< @@ -13238,7 +13296,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_16update(struct __pyx_o */ SDL_FreeSurface(__pyx_v_converted_surf); - /* "pygame/_sdl2/video.pyx":962 + /* "pygame/_sdl2/video.pyx":964 * res = SDL_UpdateTexture(self._tex, rectptr, converted_surf.pixels, converted_surf.pitch) * SDL_FreeSurface(converted_surf) * SDL_FreeFormat(pixel_format) # <<<<<<<<<<<<<< @@ -13247,7 +13305,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_16update(struct __pyx_o */ SDL_FreeFormat(__pyx_v_pixel_format); - /* "pygame/_sdl2/video.pyx":946 + /* "pygame/_sdl2/video.pyx":948 * * cdef int res * if format_ != surf.format.format: # <<<<<<<<<<<<<< @@ -13257,7 +13315,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_16update(struct __pyx_o goto __pyx_L8; } - /* "pygame/_sdl2/video.pyx":964 + /* "pygame/_sdl2/video.pyx":966 * SDL_FreeFormat(pixel_format) * else: * res = SDL_UpdateTexture(self._tex, rectptr, surf.pixels, surf.pitch) # <<<<<<<<<<<<<< @@ -13269,7 +13327,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_16update(struct __pyx_o } __pyx_L8:; - /* "pygame/_sdl2/video.pyx":966 + /* "pygame/_sdl2/video.pyx":968 * res = SDL_UpdateTexture(self._tex, rectptr, surf.pixels, surf.pitch) * * if res < 0: # <<<<<<<<<<<<<< @@ -13279,14 +13337,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_16update(struct __pyx_o __pyx_t_1 = ((__pyx_v_res < 0) != 0); if (unlikely(__pyx_t_1)) { - /* "pygame/_sdl2/video.pyx":967 + /* "pygame/_sdl2/video.pyx":969 * * if res < 0: * raise error() # <<<<<<<<<<<<<< * * cdef class Image: */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_error); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 967, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_error); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 969, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { @@ -13300,14 +13358,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_16update(struct __pyx_o } __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 967, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 969, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 967, __pyx_L1_error) + __PYX_ERR(0, 969, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":966 + /* "pygame/_sdl2/video.pyx":968 * res = SDL_UpdateTexture(self._tex, rectptr, surf.pixels, surf.pitch) * * if res < 0: # <<<<<<<<<<<<<< @@ -13316,7 +13374,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_16update(struct __pyx_o */ } - /* "pygame/_sdl2/video.pyx":907 + /* "pygame/_sdl2/video.pyx":909 * raise error() * * def update(self, surface, area=None): # <<<<<<<<<<<<<< @@ -13339,7 +13397,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_16update(struct __pyx_o return __pyx_r; } -/* "pygame/_sdl2/video.pxd":529 +/* "pygame/_sdl2/video.pxd":535 * cdef SDL_Texture* _tex * cdef Color _color * cdef readonly Renderer renderer # <<<<<<<<<<<<<< @@ -13376,7 +13434,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_8renderer___get__(struc return __pyx_r; } -/* "pygame/_sdl2/video.pxd":530 +/* "pygame/_sdl2/video.pxd":536 * cdef Color _color * cdef readonly Renderer renderer * cdef readonly int width # <<<<<<<<<<<<<< @@ -13406,7 +13464,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_5width___get__(struct _ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->width); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 530, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->width); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 536, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -13423,7 +13481,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_5width___get__(struct _ return __pyx_r; } -/* "pygame/_sdl2/video.pxd":531 +/* "pygame/_sdl2/video.pxd":537 * cdef readonly Renderer renderer * cdef readonly int width * cdef readonly int height # <<<<<<<<<<<<<< @@ -13453,7 +13511,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_6height___get__(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->height); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 531, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->height); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 537, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -13583,7 +13641,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_7Texture_20__setstate_cython__(C return __pyx_r; } -/* "pygame/_sdl2/video.pyx":971 +/* "pygame/_sdl2/video.pyx":973 * cdef class Image: * * def __cinit__(self): # <<<<<<<<<<<<<< @@ -13618,7 +13676,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_5Image___cinit__(struct __pyx_obj_6pyg int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 0); - /* "pygame/_sdl2/video.pyx":972 + /* "pygame/_sdl2/video.pyx":974 * * def __cinit__(self): * self.angle = 0 # <<<<<<<<<<<<<< @@ -13627,7 +13685,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_5Image___cinit__(struct __pyx_obj_6pyg */ __pyx_v_self->angle = 0.0; - /* "pygame/_sdl2/video.pyx":973 + /* "pygame/_sdl2/video.pyx":975 * def __cinit__(self): * self.angle = 0 * self._origin.x = 0 # <<<<<<<<<<<<<< @@ -13636,7 +13694,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_5Image___cinit__(struct __pyx_obj_6pyg */ __pyx_v_self->_origin.x = 0; - /* "pygame/_sdl2/video.pyx":974 + /* "pygame/_sdl2/video.pyx":976 * self.angle = 0 * self._origin.x = 0 * self._origin.y = 0 # <<<<<<<<<<<<<< @@ -13645,7 +13703,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_5Image___cinit__(struct __pyx_obj_6pyg */ __pyx_v_self->_origin.y = 0; - /* "pygame/_sdl2/video.pyx":975 + /* "pygame/_sdl2/video.pyx":977 * self._origin.x = 0 * self._origin.y = 0 * self._originptr = NULL # <<<<<<<<<<<<<< @@ -13654,7 +13712,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_5Image___cinit__(struct __pyx_obj_6pyg */ __pyx_v_self->_originptr = NULL; - /* "pygame/_sdl2/video.pyx":976 + /* "pygame/_sdl2/video.pyx":978 * self._origin.y = 0 * self._originptr = NULL * self.flip_x = False # <<<<<<<<<<<<<< @@ -13663,7 +13721,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_5Image___cinit__(struct __pyx_obj_6pyg */ __pyx_v_self->flip_x = 0; - /* "pygame/_sdl2/video.pyx":977 + /* "pygame/_sdl2/video.pyx":979 * self._originptr = NULL * self.flip_x = False * self.flip_y = False # <<<<<<<<<<<<<< @@ -13672,7 +13730,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_5Image___cinit__(struct __pyx_obj_6pyg */ __pyx_v_self->flip_y = 0; - /* "pygame/_sdl2/video.pyx":979 + /* "pygame/_sdl2/video.pyx":981 * self.flip_y = False * * cdef Uint8[4] defaultColor = [255, 255, 255, 255] # <<<<<<<<<<<<<< @@ -13685,23 +13743,23 @@ static int __pyx_pf_6pygame_5_sdl2_5video_5Image___cinit__(struct __pyx_obj_6pyg __pyx_t_1[3] = 0xFF; memcpy(&(__pyx_v_defaultColor[0]), __pyx_t_1, sizeof(__pyx_v_defaultColor[0]) * (4)); - /* "pygame/_sdl2/video.pyx":980 + /* "pygame/_sdl2/video.pyx":982 * * 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, 980, __pyx_L1_error) + __pyx_t_2 = pgColor_NewLength(__pyx_v_defaultColor, 3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 982, __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, 980, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6pygame_5_sdl2_5video_Color))))) __PYX_ERR(0, 982, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__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":981 + /* "pygame/_sdl2/video.pyx":983 * cdef Uint8[4] defaultColor = [255, 255, 255, 255] * self._color = pgColor_NewLength(defaultColor, 3) * self.alpha = 255 # <<<<<<<<<<<<<< @@ -13710,7 +13768,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_5Image___cinit__(struct __pyx_obj_6pyg */ __pyx_v_self->alpha = 255.0; - /* "pygame/_sdl2/video.pyx":971 + /* "pygame/_sdl2/video.pyx":973 * cdef class Image: * * def __cinit__(self): # <<<<<<<<<<<<<< @@ -13730,7 +13788,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_5Image___cinit__(struct __pyx_obj_6pyg return __pyx_r; } -/* "pygame/_sdl2/video.pyx":983 +/* "pygame/_sdl2/video.pyx":985 * self.alpha = 255 * * def __init__(self, texture_or_image, srcrect=None): # <<<<<<<<<<<<<< @@ -13781,7 +13839,7 @@ static int __pyx_pw_6pygame_5_sdl2_5video_5Image_3__init__(PyObject *__pyx_v_sel } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 983, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 985, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -13797,7 +13855,7 @@ static int __pyx_pw_6pygame_5_sdl2_5video_5Image_3__init__(PyObject *__pyx_v_sel } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 983, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 985, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pygame._sdl2.video.Image.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -13827,7 +13885,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_5Image_2__init__(struct __pyx_obj_6pyg int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "pygame/_sdl2/video.pyx":1000 + /* "pygame/_sdl2/video.pyx":1002 * cdef SDL_Rect *rectptr * * if isinstance(texture_or_image, Image): # <<<<<<<<<<<<<< @@ -13838,42 +13896,42 @@ static int __pyx_pf_6pygame_5_sdl2_5video_5Image_2__init__(struct __pyx_obj_6pyg __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "pygame/_sdl2/video.pyx":1001 + /* "pygame/_sdl2/video.pyx":1003 * * if isinstance(texture_or_image, Image): * self.texture = texture_or_image.texture # <<<<<<<<<<<<<< * self.srcrect = pgRect_New(&(texture_or_image.srcrect).r) * else: */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_texture_or_image, __pyx_n_s_texture); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1001, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_texture_or_image, __pyx_n_s_texture); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1003, __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_Texture))))) __PYX_ERR(0, 1001, __pyx_L1_error) + if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pygame_5_sdl2_5video_Texture))))) __PYX_ERR(0, 1003, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__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":1002 + /* "pygame/_sdl2/video.pyx":1004 * if isinstance(texture_or_image, Image): * self.texture = texture_or_image.texture * self.srcrect = pgRect_New(&(texture_or_image.srcrect).r) # <<<<<<<<<<<<<< * else: * self.texture = texture_or_image */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_texture_or_image, __pyx_n_s_srcrect); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1002, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_texture_or_image, __pyx_n_s_srcrect); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1004, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = pgRect_New((&((pgRectObject *)__pyx_t_3)->r)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1002, __pyx_L1_error) + __pyx_t_4 = pgRect_New((&((pgRectObject *)__pyx_t_3)->r)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1004, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pygame_5_sdl2_5video_Rect))))) __PYX_ERR(0, 1002, __pyx_L1_error) + if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pygame_5_sdl2_5video_Rect))))) __PYX_ERR(0, 1004, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_4); __Pyx_GOTREF(__pyx_v_self->srcrect); __Pyx_DECREF(((PyObject *)__pyx_v_self->srcrect)); __pyx_v_self->srcrect = ((pgRectObject *)__pyx_t_4); __pyx_t_4 = 0; - /* "pygame/_sdl2/video.pyx":1000 + /* "pygame/_sdl2/video.pyx":1002 * cdef SDL_Rect *rectptr * * if isinstance(texture_or_image, Image): # <<<<<<<<<<<<<< @@ -13883,7 +13941,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_5Image_2__init__(struct __pyx_obj_6pyg goto __pyx_L3; } - /* "pygame/_sdl2/video.pyx":1004 + /* "pygame/_sdl2/video.pyx":1006 * self.srcrect = pgRect_New(&(texture_or_image.srcrect).r) * else: * self.texture = texture_or_image # <<<<<<<<<<<<<< @@ -13891,7 +13949,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_5Image_2__init__(struct __pyx_obj_6pyg * self.blend_mode = texture_or_image.blend_mode */ /*else*/ { - if (!(likely(((__pyx_v_texture_or_image) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_texture_or_image, __pyx_ptype_6pygame_5_sdl2_5video_Texture))))) __PYX_ERR(0, 1004, __pyx_L1_error) + if (!(likely(((__pyx_v_texture_or_image) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_texture_or_image, __pyx_ptype_6pygame_5_sdl2_5video_Texture))))) __PYX_ERR(0, 1006, __pyx_L1_error) __pyx_t_4 = __pyx_v_texture_or_image; __Pyx_INCREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); @@ -13900,14 +13958,14 @@ static int __pyx_pf_6pygame_5_sdl2_5video_5Image_2__init__(struct __pyx_obj_6pyg __pyx_v_self->texture = ((struct __pyx_obj_6pygame_5_sdl2_5video_Texture *)__pyx_t_4); __pyx_t_4 = 0; - /* "pygame/_sdl2/video.pyx":1005 + /* "pygame/_sdl2/video.pyx":1007 * else: * self.texture = texture_or_image * self.srcrect = texture_or_image.get_rect() # <<<<<<<<<<<<<< * self.blend_mode = texture_or_image.blend_mode * */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_texture_or_image, __pyx_n_s_get_rect); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1005, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_texture_or_image, __pyx_n_s_get_rect); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1007, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -13921,10 +13979,10 @@ static int __pyx_pf_6pygame_5_sdl2_5video_5Image_2__init__(struct __pyx_obj_6pyg } __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1005, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1007, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pygame_5_sdl2_5video_Rect))))) __PYX_ERR(0, 1005, __pyx_L1_error) + if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pygame_5_sdl2_5video_Rect))))) __PYX_ERR(0, 1007, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_4); __Pyx_GOTREF(__pyx_v_self->srcrect); __Pyx_DECREF(((PyObject *)__pyx_v_self->srcrect)); @@ -13933,20 +13991,20 @@ static int __pyx_pf_6pygame_5_sdl2_5video_5Image_2__init__(struct __pyx_obj_6pyg } __pyx_L3:; - /* "pygame/_sdl2/video.pyx":1006 + /* "pygame/_sdl2/video.pyx":1008 * self.texture = texture_or_image * self.srcrect = texture_or_image.get_rect() * self.blend_mode = texture_or_image.blend_mode # <<<<<<<<<<<<<< * * if srcrect is not None: */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_texture_or_image, __pyx_n_s_blend_mode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1006, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_texture_or_image, __pyx_n_s_blend_mode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1008, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = ((SDL_BlendMode)__Pyx_PyInt_As_SDL_BlendMode(__pyx_t_4)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1006, __pyx_L1_error) + __pyx_t_6 = ((SDL_BlendMode)__Pyx_PyInt_As_SDL_BlendMode(__pyx_t_4)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1008, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_self->blend_mode = __pyx_t_6; - /* "pygame/_sdl2/video.pyx":1008 + /* "pygame/_sdl2/video.pyx":1010 * self.blend_mode = texture_or_image.blend_mode * * if srcrect is not None: # <<<<<<<<<<<<<< @@ -13957,7 +14015,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_5Image_2__init__(struct __pyx_obj_6pyg __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "pygame/_sdl2/video.pyx":1009 + /* "pygame/_sdl2/video.pyx":1011 * * if srcrect is not None: * rectptr = pgRect_FromObject(srcrect, &temp) # <<<<<<<<<<<<<< @@ -13966,7 +14024,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_5Image_2__init__(struct __pyx_obj_6pyg */ __pyx_v_rectptr = pgRect_FromObject(__pyx_v_srcrect, (&__pyx_v_temp)); - /* "pygame/_sdl2/video.pyx":1010 + /* "pygame/_sdl2/video.pyx":1012 * if srcrect is not None: * rectptr = pgRect_FromObject(srcrect, &temp) * if rectptr == NULL: # <<<<<<<<<<<<<< @@ -13976,20 +14034,20 @@ static int __pyx_pf_6pygame_5_sdl2_5video_5Image_2__init__(struct __pyx_obj_6pyg __pyx_t_1 = ((__pyx_v_rectptr == NULL) != 0); if (unlikely(__pyx_t_1)) { - /* "pygame/_sdl2/video.pyx":1011 + /* "pygame/_sdl2/video.pyx":1013 * 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_4 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1011, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1013, __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, 1011, __pyx_L1_error) + __PYX_ERR(0, 1013, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":1010 + /* "pygame/_sdl2/video.pyx":1012 * if srcrect is not None: * rectptr = pgRect_FromObject(srcrect, &temp) * if rectptr == NULL: # <<<<<<<<<<<<<< @@ -13998,7 +14056,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_5Image_2__init__(struct __pyx_obj_6pyg */ } - /* "pygame/_sdl2/video.pyx":1012 + /* "pygame/_sdl2/video.pyx":1014 * if rectptr == NULL: * raise TypeError('srcrect must be None or a rectangle') * temp.x = rectptr.x # <<<<<<<<<<<<<< @@ -14008,7 +14066,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_5Image_2__init__(struct __pyx_obj_6pyg __pyx_t_7 = __pyx_v_rectptr->x; __pyx_v_temp.x = __pyx_t_7; - /* "pygame/_sdl2/video.pyx":1013 + /* "pygame/_sdl2/video.pyx":1015 * raise TypeError('srcrect must be None or a rectangle') * temp.x = rectptr.x * temp.y = rectptr.y # <<<<<<<<<<<<<< @@ -14018,7 +14076,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_5Image_2__init__(struct __pyx_obj_6pyg __pyx_t_7 = __pyx_v_rectptr->y; __pyx_v_temp.y = __pyx_t_7; - /* "pygame/_sdl2/video.pyx":1014 + /* "pygame/_sdl2/video.pyx":1016 * temp.x = rectptr.x * temp.y = rectptr.y * temp.w = rectptr.w # <<<<<<<<<<<<<< @@ -14028,7 +14086,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_5Image_2__init__(struct __pyx_obj_6pyg __pyx_t_7 = __pyx_v_rectptr->w; __pyx_v_temp.w = __pyx_t_7; - /* "pygame/_sdl2/video.pyx":1015 + /* "pygame/_sdl2/video.pyx":1017 * temp.y = rectptr.y * temp.w = rectptr.w * temp.h = rectptr.h # <<<<<<<<<<<<<< @@ -14038,7 +14096,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_5Image_2__init__(struct __pyx_obj_6pyg __pyx_t_7 = __pyx_v_rectptr->h; __pyx_v_temp.h = __pyx_t_7; - /* "pygame/_sdl2/video.pyx":1017 + /* "pygame/_sdl2/video.pyx":1019 * temp.h = rectptr.h * * if temp.x < 0 or temp.y < 0 or \ # <<<<<<<<<<<<<< @@ -14058,7 +14116,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_5Image_2__init__(struct __pyx_obj_6pyg goto __pyx_L7_bool_binop_done; } - /* "pygame/_sdl2/video.pyx":1018 + /* "pygame/_sdl2/video.pyx":1020 * * if temp.x < 0 or temp.y < 0 or \ * temp.w < 0 or temp.h < 0 or \ # <<<<<<<<<<<<<< @@ -14078,21 +14136,21 @@ static int __pyx_pf_6pygame_5_sdl2_5video_5Image_2__init__(struct __pyx_obj_6pyg goto __pyx_L7_bool_binop_done; } - /* "pygame/_sdl2/video.pyx":1019 + /* "pygame/_sdl2/video.pyx":1021 * 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_4 = __Pyx_PyInt_From_int((__pyx_v_temp.x + __pyx_v_temp.w)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1019, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_temp.x + __pyx_v_temp.w)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1021, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->srcrect), __pyx_n_s_w); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1019, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->srcrect), __pyx_n_s_w); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1021, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_t_3, Py_GT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1019, __pyx_L1_error) + __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_t_3, Py_GT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1021, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1019, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1021, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!__pyx_t_2) { } else { @@ -14100,26 +14158,26 @@ static int __pyx_pf_6pygame_5_sdl2_5video_5Image_2__init__(struct __pyx_obj_6pyg goto __pyx_L7_bool_binop_done; } - /* "pygame/_sdl2/video.pyx":1020 + /* "pygame/_sdl2/video.pyx":1022 * 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_5 = __Pyx_PyInt_From_int((__pyx_v_temp.y + __pyx_v_temp.h)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1020, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_int((__pyx_v_temp.y + __pyx_v_temp.h)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1022, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->srcrect), __pyx_n_s_h); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1020, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->srcrect), __pyx_n_s_h); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1022, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_t_3, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1020, __pyx_L1_error) + __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_t_3, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1022, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1020, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1022, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_1 = __pyx_t_2; __pyx_L7_bool_binop_done:; - /* "pygame/_sdl2/video.pyx":1017 + /* "pygame/_sdl2/video.pyx":1019 * temp.h = rectptr.h * * if temp.x < 0 or temp.y < 0 or \ # <<<<<<<<<<<<<< @@ -14128,20 +14186,20 @@ static int __pyx_pf_6pygame_5_sdl2_5video_5Image_2__init__(struct __pyx_obj_6pyg */ if (unlikely(__pyx_t_1)) { - /* "pygame/_sdl2/video.pyx":1021 + /* "pygame/_sdl2/video.pyx":1023 * 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_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1021, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1023, __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, 1021, __pyx_L1_error) + __PYX_ERR(0, 1023, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":1017 + /* "pygame/_sdl2/video.pyx":1019 * temp.h = rectptr.h * * if temp.x < 0 or temp.y < 0 or \ # <<<<<<<<<<<<<< @@ -14150,61 +14208,61 @@ static int __pyx_pf_6pygame_5_sdl2_5video_5Image_2__init__(struct __pyx_obj_6pyg */ } - /* "pygame/_sdl2/video.pyx":1022 + /* "pygame/_sdl2/video.pyx":1024 * 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_4 = __Pyx_PyInt_From_int(__pyx_v_temp.x); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1022, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_temp.x); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1024, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->srcrect), __pyx_n_s_x); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1022, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->srcrect), __pyx_n_s_x); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1024, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = PyNumber_InPlaceAdd(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1022, __pyx_L1_error) + __pyx_t_5 = PyNumber_InPlaceAdd(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1024, __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_7 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1022, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1024, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_temp.x = __pyx_t_7; - /* "pygame/_sdl2/video.pyx":1023 + /* "pygame/_sdl2/video.pyx":1025 * 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_5 = __Pyx_PyInt_From_int(__pyx_v_temp.y); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1023, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_temp.y); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1025, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->srcrect), __pyx_n_s_y); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1023, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->srcrect), __pyx_n_s_y); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1025, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1023, __pyx_L1_error) + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1025, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1023, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1025, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_temp.y = __pyx_t_7; - /* "pygame/_sdl2/video.pyx":1024 + /* "pygame/_sdl2/video.pyx":1026 * temp.x += self.srcrect.x * temp.y += self.srcrect.y * self.srcrect = pgRect_New(&temp) # <<<<<<<<<<<<<< * * @property */ - __pyx_t_4 = pgRect_New((&__pyx_v_temp)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1024, __pyx_L1_error) + __pyx_t_4 = pgRect_New((&__pyx_v_temp)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1026, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pygame_5_sdl2_5video_Rect))))) __PYX_ERR(0, 1024, __pyx_L1_error) + if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pygame_5_sdl2_5video_Rect))))) __PYX_ERR(0, 1026, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_4); __Pyx_GOTREF(__pyx_v_self->srcrect); __Pyx_DECREF(((PyObject *)__pyx_v_self->srcrect)); __pyx_v_self->srcrect = ((pgRectObject *)__pyx_t_4); __pyx_t_4 = 0; - /* "pygame/_sdl2/video.pyx":1008 + /* "pygame/_sdl2/video.pyx":1010 * self.blend_mode = texture_or_image.blend_mode * * if srcrect is not None: # <<<<<<<<<<<<<< @@ -14213,7 +14271,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_5Image_2__init__(struct __pyx_obj_6pyg */ } - /* "pygame/_sdl2/video.pyx":983 + /* "pygame/_sdl2/video.pyx":985 * self.alpha = 255 * * def __init__(self, texture_or_image, srcrect=None): # <<<<<<<<<<<<<< @@ -14235,7 +14293,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_5Image_2__init__(struct __pyx_obj_6pyg return __pyx_r; } -/* "pygame/_sdl2/video.pyx":1027 +/* "pygame/_sdl2/video.pyx":1029 * * @property * def color(self): # <<<<<<<<<<<<<< @@ -14261,7 +14319,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5Image_5color___get__(struct __p __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); - /* "pygame/_sdl2/video.pyx":1030 + /* "pygame/_sdl2/video.pyx":1032 * """Gets or sets the Image color modifier * """ * return self._color # <<<<<<<<<<<<<< @@ -14273,7 +14331,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5Image_5color___get__(struct __p __pyx_r = ((PyObject *)__pyx_v_self->_color); goto __pyx_L0; - /* "pygame/_sdl2/video.pyx":1027 + /* "pygame/_sdl2/video.pyx":1029 * * @property * def color(self): # <<<<<<<<<<<<<< @@ -14288,7 +14346,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5Image_5color___get__(struct __p return __pyx_r; } -/* "pygame/_sdl2/video.pyx":1033 +/* "pygame/_sdl2/video.pyx":1035 * * @color.setter * def color(self, new_color): # <<<<<<<<<<<<<< @@ -14318,19 +14376,19 @@ static int __pyx_pf_6pygame_5_sdl2_5video_5Image_5color_2__set__(struct __pyx_ob int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - /* "pygame/_sdl2/video.pyx":1034 + /* "pygame/_sdl2/video.pyx":1036 * @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__27, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1034, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_new_color, 0, 3, NULL, NULL, &__pyx_slice__27, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1036, __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__27, 0, 1, 1) < 0) __PYX_ERR(0, 1034, __pyx_L1_error) + if (__Pyx_PyObject_SetSlice(((PyObject *)__pyx_v_self->_color), __pyx_t_1, 0, 3, NULL, NULL, &__pyx_slice__27, 0, 1, 1) < 0) __PYX_ERR(0, 1036, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sdl2/video.pyx":1033 + /* "pygame/_sdl2/video.pyx":1035 * * @color.setter * def color(self, new_color): # <<<<<<<<<<<<<< @@ -14350,7 +14408,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_5Image_5color_2__set__(struct __pyx_ob return __pyx_r; } -/* "pygame/_sdl2/video.pyx":1037 +/* "pygame/_sdl2/video.pyx":1039 * * @property * def origin(self): # <<<<<<<<<<<<<< @@ -14383,7 +14441,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5Image_6origin___get__(struct __ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "pygame/_sdl2/video.pyx":1045 + /* "pygame/_sdl2/video.pyx":1047 * its center. * """ * if self._originptr == NULL: # <<<<<<<<<<<<<< @@ -14393,7 +14451,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5Image_6origin___get__(struct __ __pyx_t_1 = ((__pyx_v_self->_originptr == NULL) != 0); if (__pyx_t_1) { - /* "pygame/_sdl2/video.pyx":1046 + /* "pygame/_sdl2/video.pyx":1048 * """ * if self._originptr == NULL: * return None # <<<<<<<<<<<<<< @@ -14404,7 +14462,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5Image_6origin___get__(struct __ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "pygame/_sdl2/video.pyx":1045 + /* "pygame/_sdl2/video.pyx":1047 * its center. * """ * if self._originptr == NULL: # <<<<<<<<<<<<<< @@ -14413,7 +14471,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5Image_6origin___get__(struct __ */ } - /* "pygame/_sdl2/video.pyx":1048 + /* "pygame/_sdl2/video.pyx":1050 * return None * else: * return (self._origin.x, self._origin.y) # <<<<<<<<<<<<<< @@ -14422,11 +14480,11 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5Image_6origin___get__(struct __ */ /*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, 1048, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->_origin.x); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1050, __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, 1048, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->_origin.y); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1050, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1048, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1050, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); @@ -14439,7 +14497,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5Image_6origin___get__(struct __ goto __pyx_L0; } - /* "pygame/_sdl2/video.pyx":1037 + /* "pygame/_sdl2/video.pyx":1039 * * @property * def origin(self): # <<<<<<<<<<<<<< @@ -14460,7 +14518,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5Image_6origin___get__(struct __ return __pyx_r; } -/* "pygame/_sdl2/video.pyx":1051 +/* "pygame/_sdl2/video.pyx":1053 * * @origin.setter * def origin(self, new_origin): # <<<<<<<<<<<<<< @@ -14492,43 +14550,43 @@ static int __pyx_pf_6pygame_5_sdl2_5video_5Image_6origin_2__set__(struct __pyx_o int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - /* "pygame/_sdl2/video.pyx":1052 + /* "pygame/_sdl2/video.pyx":1054 * @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, 1052, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_new_origin); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1054, __pyx_L1_error) if (__pyx_t_1) { - /* "pygame/_sdl2/video.pyx":1053 + /* "pygame/_sdl2/video.pyx":1055 * 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, 1053, __pyx_L1_error) + __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, 1055, __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, 1053, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1055, __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":1054 + /* "pygame/_sdl2/video.pyx":1056 * 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, 1054, __pyx_L1_error) + __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, 1056, __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, 1054, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1056, __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":1055 + /* "pygame/_sdl2/video.pyx":1057 * self._origin.x = new_origin[0] * self._origin.y = new_origin[1] * self._originptr = &self._origin # <<<<<<<<<<<<<< @@ -14537,7 +14595,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_5Image_6origin_2__set__(struct __pyx_o */ __pyx_v_self->_originptr = (&__pyx_v_self->_origin); - /* "pygame/_sdl2/video.pyx":1052 + /* "pygame/_sdl2/video.pyx":1054 * @origin.setter * def origin(self, new_origin): * if new_origin: # <<<<<<<<<<<<<< @@ -14547,7 +14605,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_5Image_6origin_2__set__(struct __pyx_o goto __pyx_L3; } - /* "pygame/_sdl2/video.pyx":1057 + /* "pygame/_sdl2/video.pyx":1059 * self._originptr = &self._origin * else: * self._originptr = NULL # <<<<<<<<<<<<<< @@ -14559,7 +14617,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_5Image_6origin_2__set__(struct __pyx_o } __pyx_L3:; - /* "pygame/_sdl2/video.pyx":1051 + /* "pygame/_sdl2/video.pyx":1053 * * @origin.setter * def origin(self, new_origin): # <<<<<<<<<<<<<< @@ -14579,7 +14637,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_5Image_6origin_2__set__(struct __pyx_o return __pyx_r; } -/* "pygame/_sdl2/video.pyx":1059 +/* "pygame/_sdl2/video.pyx":1061 * self._originptr = NULL * * def get_rect(self): # <<<<<<<<<<<<<< @@ -14610,7 +14668,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5Image_4get_rect(struct __pyx_ob int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_rect", 0); - /* "pygame/_sdl2/video.pyx":1067 + /* "pygame/_sdl2/video.pyx":1069 * created from. * """ * return pgRect_New(&self.srcrect.r) # <<<<<<<<<<<<<< @@ -14618,13 +14676,13 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5Image_4get_rect(struct __pyx_ob * cpdef void draw(self, srcrect=None, dstrect=None): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = pgRect_New((&__pyx_v_self->srcrect->r)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1067, __pyx_L1_error) + __pyx_t_1 = pgRect_New((&__pyx_v_self->srcrect->r)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1069, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "pygame/_sdl2/video.pyx":1059 + /* "pygame/_sdl2/video.pyx":1061 * self._originptr = NULL * * def get_rect(self): # <<<<<<<<<<<<<< @@ -14643,7 +14701,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5Image_4get_rect(struct __pyx_ob return __pyx_r; } -/* "pygame/_sdl2/video.pyx":1069 +/* "pygame/_sdl2/video.pyx":1071 * return pgRect_New(&self.srcrect.r) * * cpdef void draw(self, srcrect=None, dstrect=None): # <<<<<<<<<<<<<< @@ -14693,7 +14751,7 @@ static void __pyx_f_6pygame_5_sdl2_5video_5Image_draw(struct __pyx_obj_6pygame_5 if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_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, 1069, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_draw); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1071, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pygame_5_sdl2_5video_5Image_7draw)) { __Pyx_INCREF(__pyx_t_1); @@ -14712,7 +14770,7 @@ static void __pyx_f_6pygame_5_sdl2_5video_5Image_draw(struct __pyx_obj_6pygame_5 #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_srcrect, __pyx_v_dstrect}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1069, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1071, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -14720,13 +14778,13 @@ static void __pyx_f_6pygame_5_sdl2_5video_5Image_draw(struct __pyx_obj_6pygame_5 #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_srcrect, __pyx_v_dstrect}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1069, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1071, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { - __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1069, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1071, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -14737,7 +14795,7 @@ static void __pyx_f_6pygame_5_sdl2_5video_5Image_draw(struct __pyx_obj_6pygame_5 __Pyx_INCREF(__pyx_v_dstrect); __Pyx_GIVEREF(__pyx_v_dstrect); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_dstrect); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1069, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1071, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -14759,7 +14817,7 @@ static void __pyx_f_6pygame_5_sdl2_5video_5Image_draw(struct __pyx_obj_6pygame_5 #endif } - /* "pygame/_sdl2/video.pyx":1080 + /* "pygame/_sdl2/video.pyx":1082 * cdef SDL_Rect src * cdef SDL_Rect dst * cdef SDL_Rect *csrcrect = NULL # <<<<<<<<<<<<<< @@ -14768,7 +14826,7 @@ static void __pyx_f_6pygame_5_sdl2_5video_5Image_draw(struct __pyx_obj_6pygame_5 */ __pyx_v_csrcrect = NULL; - /* "pygame/_sdl2/video.pyx":1081 + /* "pygame/_sdl2/video.pyx":1083 * cdef SDL_Rect dst * cdef SDL_Rect *csrcrect = NULL * cdef SDL_Rect *cdstrect = NULL # <<<<<<<<<<<<<< @@ -14777,7 +14835,7 @@ static void __pyx_f_6pygame_5_sdl2_5video_5Image_draw(struct __pyx_obj_6pygame_5 */ __pyx_v_cdstrect = NULL; - /* "pygame/_sdl2/video.pyx":1084 + /* "pygame/_sdl2/video.pyx":1086 * cdef SDL_Rect *rectptr * * if srcrect is None: # <<<<<<<<<<<<<< @@ -14788,7 +14846,7 @@ static void __pyx_f_6pygame_5_sdl2_5video_5Image_draw(struct __pyx_obj_6pygame_5 __pyx_t_8 = (__pyx_t_7 != 0); if (__pyx_t_8) { - /* "pygame/_sdl2/video.pyx":1085 + /* "pygame/_sdl2/video.pyx":1087 * * if srcrect is None: * csrcrect = &self.srcrect.r # <<<<<<<<<<<<<< @@ -14797,7 +14855,7 @@ static void __pyx_f_6pygame_5_sdl2_5video_5Image_draw(struct __pyx_obj_6pygame_5 */ __pyx_v_csrcrect = (&__pyx_v_self->srcrect->r); - /* "pygame/_sdl2/video.pyx":1084 + /* "pygame/_sdl2/video.pyx":1086 * cdef SDL_Rect *rectptr * * if srcrect is None: # <<<<<<<<<<<<<< @@ -14807,7 +14865,7 @@ static void __pyx_f_6pygame_5_sdl2_5video_5Image_draw(struct __pyx_obj_6pygame_5 goto __pyx_L3; } - /* "pygame/_sdl2/video.pyx":1087 + /* "pygame/_sdl2/video.pyx":1089 * csrcrect = &self.srcrect.r * else: * if pgRect_Check(srcrect): # <<<<<<<<<<<<<< @@ -14818,7 +14876,7 @@ static void __pyx_f_6pygame_5_sdl2_5video_5Image_draw(struct __pyx_obj_6pygame_5 __pyx_t_8 = (pgRect_Check(__pyx_v_srcrect) != 0); if (__pyx_t_8) { - /* "pygame/_sdl2/video.pyx":1088 + /* "pygame/_sdl2/video.pyx":1090 * else: * if pgRect_Check(srcrect): * src = (srcrect).r # <<<<<<<<<<<<<< @@ -14828,7 +14886,7 @@ static void __pyx_f_6pygame_5_sdl2_5video_5Image_draw(struct __pyx_obj_6pygame_5 __pyx_t_9 = ((pgRectObject *)__pyx_v_srcrect)->r; __pyx_v_src = __pyx_t_9; - /* "pygame/_sdl2/video.pyx":1087 + /* "pygame/_sdl2/video.pyx":1089 * csrcrect = &self.srcrect.r * else: * if pgRect_Check(srcrect): # <<<<<<<<<<<<<< @@ -14838,7 +14896,7 @@ static void __pyx_f_6pygame_5_sdl2_5video_5Image_draw(struct __pyx_obj_6pygame_5 goto __pyx_L4; } - /* "pygame/_sdl2/video.pyx":1091 + /* "pygame/_sdl2/video.pyx":1093 * else: * * rectptr = pgRect_FromObject(srcrect, &src) # <<<<<<<<<<<<<< @@ -14848,7 +14906,7 @@ static void __pyx_f_6pygame_5_sdl2_5video_5Image_draw(struct __pyx_obj_6pygame_5 /*else*/ { __pyx_v_rectptr = pgRect_FromObject(__pyx_v_srcrect, (&__pyx_v_src)); - /* "pygame/_sdl2/video.pyx":1092 + /* "pygame/_sdl2/video.pyx":1094 * * rectptr = pgRect_FromObject(srcrect, &src) * if rectptr == NULL: # <<<<<<<<<<<<<< @@ -14858,20 +14916,20 @@ static void __pyx_f_6pygame_5_sdl2_5video_5Image_draw(struct __pyx_obj_6pygame_5 __pyx_t_8 = ((__pyx_v_rectptr == NULL) != 0); if (unlikely(__pyx_t_8)) { - /* "pygame/_sdl2/video.pyx":1093 + /* "pygame/_sdl2/video.pyx":1095 * 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__28, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1093, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__28, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1095, __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, 1093, __pyx_L1_error) + __PYX_ERR(0, 1095, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":1092 + /* "pygame/_sdl2/video.pyx":1094 * * rectptr = pgRect_FromObject(srcrect, &src) * if rectptr == NULL: # <<<<<<<<<<<<<< @@ -14880,7 +14938,7 @@ static void __pyx_f_6pygame_5_sdl2_5video_5Image_draw(struct __pyx_obj_6pygame_5 */ } - /* "pygame/_sdl2/video.pyx":1094 + /* "pygame/_sdl2/video.pyx":1096 * if rectptr == NULL: * raise TypeError('srcrect must be a rect or None') * src.x = rectptr.x # <<<<<<<<<<<<<< @@ -14890,7 +14948,7 @@ static void __pyx_f_6pygame_5_sdl2_5video_5Image_draw(struct __pyx_obj_6pygame_5 __pyx_t_5 = __pyx_v_rectptr->x; __pyx_v_src.x = __pyx_t_5; - /* "pygame/_sdl2/video.pyx":1095 + /* "pygame/_sdl2/video.pyx":1097 * raise TypeError('srcrect must be a rect or None') * src.x = rectptr.x * src.y = rectptr.y # <<<<<<<<<<<<<< @@ -14900,7 +14958,7 @@ static void __pyx_f_6pygame_5_sdl2_5video_5Image_draw(struct __pyx_obj_6pygame_5 __pyx_t_5 = __pyx_v_rectptr->y; __pyx_v_src.y = __pyx_t_5; - /* "pygame/_sdl2/video.pyx":1096 + /* "pygame/_sdl2/video.pyx":1098 * src.x = rectptr.x * src.y = rectptr.y * src.w = rectptr.w # <<<<<<<<<<<<<< @@ -14910,7 +14968,7 @@ static void __pyx_f_6pygame_5_sdl2_5video_5Image_draw(struct __pyx_obj_6pygame_5 __pyx_t_5 = __pyx_v_rectptr->w; __pyx_v_src.w = __pyx_t_5; - /* "pygame/_sdl2/video.pyx":1097 + /* "pygame/_sdl2/video.pyx":1099 * src.y = rectptr.y * src.w = rectptr.w * src.h = rectptr.h # <<<<<<<<<<<<<< @@ -14922,45 +14980,45 @@ static void __pyx_f_6pygame_5_sdl2_5video_5Image_draw(struct __pyx_obj_6pygame_5 } __pyx_L4:; - /* "pygame/_sdl2/video.pyx":1099 + /* "pygame/_sdl2/video.pyx":1101 * 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, 1099, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_src.x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1101, __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, 1099, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->srcrect), __pyx_n_s_x); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1101, __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, 1099, __pyx_L1_error) + __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1101, __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_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1099, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1101, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_src.x = __pyx_t_5; - /* "pygame/_sdl2/video.pyx":1100 + /* "pygame/_sdl2/video.pyx":1102 * * 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, 1100, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_src.y); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1102, __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, 1100, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->srcrect), __pyx_n_s_y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1102, __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, 1100, __pyx_L1_error) + __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1102, __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_5 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1100, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1102, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_src.y = __pyx_t_5; - /* "pygame/_sdl2/video.pyx":1101 + /* "pygame/_sdl2/video.pyx":1103 * src.x += self.srcrect.x * src.y += self.srcrect.y * csrcrect = &src # <<<<<<<<<<<<<< @@ -14971,7 +15029,7 @@ static void __pyx_f_6pygame_5_sdl2_5video_5Image_draw(struct __pyx_obj_6pygame_5 } __pyx_L3:; - /* "pygame/_sdl2/video.pyx":1103 + /* "pygame/_sdl2/video.pyx":1105 * csrcrect = &src * * if dstrect is not None: # <<<<<<<<<<<<<< @@ -14982,7 +15040,7 @@ static void __pyx_f_6pygame_5_sdl2_5video_5Image_draw(struct __pyx_obj_6pygame_5 __pyx_t_7 = (__pyx_t_8 != 0); if (__pyx_t_7) { - /* "pygame/_sdl2/video.pyx":1104 + /* "pygame/_sdl2/video.pyx":1106 * * if dstrect is not None: * cdstrect = pgRect_FromObject(dstrect, &dst) # <<<<<<<<<<<<<< @@ -14991,7 +15049,7 @@ static void __pyx_f_6pygame_5_sdl2_5video_5Image_draw(struct __pyx_obj_6pygame_5 */ __pyx_v_cdstrect = pgRect_FromObject(__pyx_v_dstrect, (&__pyx_v_dst)); - /* "pygame/_sdl2/video.pyx":1105 + /* "pygame/_sdl2/video.pyx":1107 * if dstrect is not None: * cdstrect = pgRect_FromObject(dstrect, &dst) * if cdstrect == NULL: # <<<<<<<<<<<<<< @@ -15001,70 +15059,70 @@ static void __pyx_f_6pygame_5_sdl2_5video_5Image_draw(struct __pyx_obj_6pygame_5 __pyx_t_7 = ((__pyx_v_cdstrect == NULL) != 0); if (__pyx_t_7) { - /* "pygame/_sdl2/video.pyx":1106 + /* "pygame/_sdl2/video.pyx":1108 * 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, 1106, __pyx_L1_error) + __pyx_t_10 = PyObject_Length(__pyx_v_dstrect); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1108, __pyx_L1_error) __pyx_t_7 = ((__pyx_t_10 == 2) != 0); if (likely(__pyx_t_7)) { - /* "pygame/_sdl2/video.pyx":1107 + /* "pygame/_sdl2/video.pyx":1109 * 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, 1107, __pyx_L1_error) + __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, 1109, __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, 1107, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1109, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dst.x = __pyx_t_5; - /* "pygame/_sdl2/video.pyx":1108 + /* "pygame/_sdl2/video.pyx":1110 * 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, 1108, __pyx_L1_error) + __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, 1110, __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, 1108, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1110, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dst.y = __pyx_t_5; - /* "pygame/_sdl2/video.pyx":1109 + /* "pygame/_sdl2/video.pyx":1111 * 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, 1109, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->srcrect), __pyx_n_s_w); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1111, __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, 1109, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1111, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dst.w = __pyx_t_5; - /* "pygame/_sdl2/video.pyx":1110 + /* "pygame/_sdl2/video.pyx":1112 * 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, 1110, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->srcrect), __pyx_n_s_h); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1112, __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, 1110, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1112, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dst.h = __pyx_t_5; - /* "pygame/_sdl2/video.pyx":1111 + /* "pygame/_sdl2/video.pyx":1113 * dst.w = self.srcrect.w * dst.h = self.srcrect.h * cdstrect = &dst # <<<<<<<<<<<<<< @@ -15073,7 +15131,7 @@ static void __pyx_f_6pygame_5_sdl2_5video_5Image_draw(struct __pyx_obj_6pygame_5 */ __pyx_v_cdstrect = (&__pyx_v_dst); - /* "pygame/_sdl2/video.pyx":1106 + /* "pygame/_sdl2/video.pyx":1108 * cdstrect = pgRect_FromObject(dstrect, &dst) * if cdstrect == NULL: * if len(dstrect) == 2: # <<<<<<<<<<<<<< @@ -15083,7 +15141,7 @@ static void __pyx_f_6pygame_5_sdl2_5video_5Image_draw(struct __pyx_obj_6pygame_5 goto __pyx_L8; } - /* "pygame/_sdl2/video.pyx":1113 + /* "pygame/_sdl2/video.pyx":1115 * cdstrect = &dst * else: * raise TypeError('dstrect must be a position, rect, or None') # <<<<<<<<<<<<<< @@ -15091,15 +15149,15 @@ static void __pyx_f_6pygame_5_sdl2_5video_5Image_draw(struct __pyx_obj_6pygame_5 * self.texture.color = self._color */ /*else*/ { - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1113, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1115, __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, 1113, __pyx_L1_error) + __PYX_ERR(0, 1115, __pyx_L1_error) } __pyx_L8:; - /* "pygame/_sdl2/video.pyx":1105 + /* "pygame/_sdl2/video.pyx":1107 * if dstrect is not None: * cdstrect = pgRect_FromObject(dstrect, &dst) * if cdstrect == NULL: # <<<<<<<<<<<<<< @@ -15108,7 +15166,7 @@ static void __pyx_f_6pygame_5_sdl2_5video_5Image_draw(struct __pyx_obj_6pygame_5 */ } - /* "pygame/_sdl2/video.pyx":1103 + /* "pygame/_sdl2/video.pyx":1105 * csrcrect = &src * * if dstrect is not None: # <<<<<<<<<<<<<< @@ -15117,7 +15175,7 @@ static void __pyx_f_6pygame_5_sdl2_5video_5Image_draw(struct __pyx_obj_6pygame_5 */ } - /* "pygame/_sdl2/video.pyx":1115 + /* "pygame/_sdl2/video.pyx":1117 * raise TypeError('dstrect must be a position, rect, or None') * * self.texture.color = self._color # <<<<<<<<<<<<<< @@ -15126,34 +15184,34 @@ static void __pyx_f_6pygame_5_sdl2_5video_5Image_draw(struct __pyx_obj_6pygame_5 */ __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, 1115, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self->texture), __pyx_n_s_color, __pyx_t_1) < 0) __PYX_ERR(0, 1117, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sdl2/video.pyx":1116 + /* "pygame/_sdl2/video.pyx":1118 * * 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, 1116, __pyx_L1_error) + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->alpha); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1118, __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, 1116, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self->texture), __pyx_n_s_alpha, __pyx_t_1) < 0) __PYX_ERR(0, 1118, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sdl2/video.pyx":1117 + /* "pygame/_sdl2/video.pyx":1119 * 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, 1117, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_SDL_BlendMode(__pyx_v_self->blend_mode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1119, __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, 1117, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self->texture), __pyx_n_s_blend_mode, __pyx_t_1) < 0) __PYX_ERR(0, 1119, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sdl2/video.pyx":1119 + /* "pygame/_sdl2/video.pyx":1121 * self.texture.blend_mode = self.blend_mode * * self.texture.draw_internal(csrcrect, cdstrect, self.angle, # <<<<<<<<<<<<<< @@ -15165,11 +15223,11 @@ static void __pyx_f_6pygame_5_sdl2_5video_5Image_draw(struct __pyx_obj_6pygame_5 __pyx_t_11.originptr = __pyx_v_self->_originptr; __pyx_t_11.flip_x = __pyx_v_self->flip_x; __pyx_t_11.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_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1119, __pyx_L1_error) + __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_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1121, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sdl2/video.pyx":1069 + /* "pygame/_sdl2/video.pyx":1071 * return pgRect_New(&self.srcrect.r) * * cpdef void draw(self, srcrect=None, dstrect=None): # <<<<<<<<<<<<<< @@ -15233,7 +15291,7 @@ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_5Image_7draw(PyObject *__pyx_v_s } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "draw") < 0)) __PYX_ERR(0, 1069, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "draw") < 0)) __PYX_ERR(0, 1071, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -15250,7 +15308,7 @@ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_5Image_7draw(PyObject *__pyx_v_s } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("draw", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1069, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("draw", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1071, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pygame._sdl2.video.Image.draw", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -15277,7 +15335,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5Image_6draw(struct __pyx_obj_6p __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, 1069, __pyx_L1_error) + __pyx_t_2 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1071, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -15294,7 +15352,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5Image_6draw(struct __pyx_obj_6p return __pyx_r; } -/* "pygame/_sdl2/video.pxd":540 +/* "pygame/_sdl2/video.pxd":546 * cdef class Image: * cdef Color _color * cdef public float angle # <<<<<<<<<<<<<< @@ -15324,7 +15382,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5Image_5angle___get__(struct __p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->angle); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 540, __pyx_L1_error) + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->angle); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 546, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -15362,7 +15420,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_5Image_5angle_2__set__(struct __pyx_ob const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - __pyx_t_1 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_1 == (float)-1) && PyErr_Occurred())) __PYX_ERR(2, 540, __pyx_L1_error) + __pyx_t_1 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_1 == (float)-1) && PyErr_Occurred())) __PYX_ERR(2, 546, __pyx_L1_error) __pyx_v_self->angle = __pyx_t_1; /* function exit code */ @@ -15376,7 +15434,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_5Image_5angle_2__set__(struct __pyx_ob return __pyx_r; } -/* "pygame/_sdl2/video.pxd":543 +/* "pygame/_sdl2/video.pxd":549 * cdef SDL_Point _origin * cdef SDL_Point* _originptr * cdef public bint flip_x # <<<<<<<<<<<<<< @@ -15406,7 +15464,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5Image_6flip_x___get__(struct __ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->flip_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 543, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->flip_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -15444,7 +15502,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_5Image_6flip_x_2__set__(struct __pyx_o const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 543, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 549, __pyx_L1_error) __pyx_v_self->flip_x = __pyx_t_1; /* function exit code */ @@ -15458,7 +15516,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_5Image_6flip_x_2__set__(struct __pyx_o return __pyx_r; } -/* "pygame/_sdl2/video.pxd":544 +/* "pygame/_sdl2/video.pxd":550 * cdef SDL_Point* _originptr * cdef public bint flip_x * cdef public bint flip_y # <<<<<<<<<<<<<< @@ -15488,7 +15546,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5Image_6flip_y___get__(struct __ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->flip_y); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 544, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->flip_y); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -15526,7 +15584,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_5Image_6flip_y_2__set__(struct __pyx_o const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 544, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 550, __pyx_L1_error) __pyx_v_self->flip_y = __pyx_t_1; /* function exit code */ @@ -15540,7 +15598,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_5Image_6flip_y_2__set__(struct __pyx_o return __pyx_r; } -/* "pygame/_sdl2/video.pxd":545 +/* "pygame/_sdl2/video.pxd":551 * cdef public bint flip_x * cdef public bint flip_y * cdef public float alpha # <<<<<<<<<<<<<< @@ -15570,7 +15628,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5Image_5alpha___get__(struct __p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->alpha); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 545, __pyx_L1_error) + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->alpha); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 551, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -15608,7 +15666,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_5Image_5alpha_2__set__(struct __pyx_ob const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - __pyx_t_1 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_1 == (float)-1) && PyErr_Occurred())) __PYX_ERR(2, 545, __pyx_L1_error) + __pyx_t_1 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_1 == (float)-1) && PyErr_Occurred())) __PYX_ERR(2, 551, __pyx_L1_error) __pyx_v_self->alpha = __pyx_t_1; /* function exit code */ @@ -15622,7 +15680,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_5Image_5alpha_2__set__(struct __pyx_ob return __pyx_r; } -/* "pygame/_sdl2/video.pxd":546 +/* "pygame/_sdl2/video.pxd":552 * cdef public bint flip_y * cdef public float alpha * cdef public SDL_BlendMode blend_mode # <<<<<<<<<<<<<< @@ -15652,7 +15710,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5Image_10blend_mode___get__(stru int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_SDL_BlendMode(__pyx_v_self->blend_mode); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 546, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_SDL_BlendMode(__pyx_v_self->blend_mode); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 552, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -15690,7 +15748,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_5Image_10blend_mode_2__set__(struct __ const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - __pyx_t_1 = ((SDL_BlendMode)__Pyx_PyInt_As_SDL_BlendMode(__pyx_v_value)); if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 546, __pyx_L1_error) + __pyx_t_1 = ((SDL_BlendMode)__Pyx_PyInt_As_SDL_BlendMode(__pyx_v_value)); if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 552, __pyx_L1_error) __pyx_v_self->blend_mode = __pyx_t_1; /* function exit code */ @@ -15704,7 +15762,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_5Image_10blend_mode_2__set__(struct __ return __pyx_r; } -/* "pygame/_sdl2/video.pxd":548 +/* "pygame/_sdl2/video.pxd":554 * cdef public SDL_BlendMode blend_mode * * cdef public Texture texture # <<<<<<<<<<<<<< @@ -15762,7 +15820,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_5Image_7texture_2__set__(struct __pyx_ const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_6pygame_5_sdl2_5video_Texture))))) __PYX_ERR(2, 548, __pyx_L1_error) + if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_6pygame_5_sdl2_5video_Texture))))) __PYX_ERR(2, 554, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -15812,7 +15870,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_5Image_7texture_4__del__(struct __pyx_ return __pyx_r; } -/* "pygame/_sdl2/video.pxd":549 +/* "pygame/_sdl2/video.pxd":555 * * cdef public Texture texture * cdef public Rect srcrect # <<<<<<<<<<<<<< @@ -15870,7 +15928,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_5Image_7srcrect_2__set__(struct __pyx_ const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_6pygame_5_sdl2_5video_Rect))))) __PYX_ERR(2, 549, __pyx_L1_error) + if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_6pygame_5_sdl2_5video_Rect))))) __PYX_ERR(2, 555, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -16033,111 +16091,189 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_5Image_10__setstate_cython__(CYT return __pyx_r; } -/* "pygame/_sdl2/video.pyx":1126 +/* "pygame/_sdl2/video.pyx":1128 * * @classmethod - * def from_window(cls, Window window): # <<<<<<<<<<<<<< - * cdef Renderer self = cls.__new__(cls) - * self._win = window + * def from_window(cls, window): # <<<<<<<<<<<<<< + * cdef Window _window + * if isinstance(window,(_Window,Window)): */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_8Renderer_1from_window(PyObject *__pyx_v_cls, PyObject *__pyx_v_window); /*proto*/ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_8Renderer_1from_window(PyObject *__pyx_v_cls, PyObject *__pyx_v_window) { - 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 (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_window), __pyx_ptype_6pygame_5_sdl2_5video_Window, 1, "window", 0))) __PYX_ERR(0, 1126, __pyx_L1_error) - __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_8Renderer_from_window(((PyTypeObject*)__pyx_v_cls), ((struct __pyx_obj_6pygame_5_sdl2_5video_Window *)__pyx_v_window)); + __pyx_r = __pyx_pf_6pygame_5_sdl2_5video_8Renderer_from_window(((PyTypeObject*)__pyx_v_cls), ((PyObject *)__pyx_v_window)); /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __pyx_r = NULL; - __pyx_L0:; __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) { +static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_from_window(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_window) { + pgWindowObject *__pyx_v__window = 0; 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_1; int __pyx_t_2; - PyObject *__pyx_t_3 = NULL; + int __pyx_t_3; PyObject *__pyx_t_4 = NULL; - int __pyx_t_5; - Uint8 __pyx_t_6[4]; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + Uint8 __pyx_t_7[4]; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("from_window", 0); - /* "pygame/_sdl2/video.pyx":1127 - * @classmethod - * def from_window(cls, Window window): + /* "pygame/_sdl2/video.pyx":1130 + * def from_window(cls, window): + * cdef Window _window + * if isinstance(window,(_Window,Window)): # <<<<<<<<<<<<<< + * _window = window + * else: + */ + __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_window, __pyx_ptype_6pygame_5_sdl2_5video__Window); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_window, __pyx_ptype_6pygame_5_sdl2_5video_Window); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (likely(__pyx_t_2)) { + + /* "pygame/_sdl2/video.pyx":1131 + * cdef Window _window + * if isinstance(window,(_Window,Window)): + * _window = window # <<<<<<<<<<<<<< + * else: + * raise TypeError( + */ + __pyx_t_4 = __pyx_v_window; + __Pyx_INCREF(__pyx_t_4); + __pyx_v__window = ((pgWindowObject *)__pyx_t_4); + __pyx_t_4 = 0; + + /* "pygame/_sdl2/video.pyx":1130 + * def from_window(cls, window): + * cdef Window _window + * if isinstance(window,(_Window,Window)): # <<<<<<<<<<<<<< + * _window = window + * else: + */ + goto __pyx_L3; + } + + /* "pygame/_sdl2/video.pyx":1133 + * _window = window + * else: + * raise TypeError( # <<<<<<<<<<<<<< + * "Argument 'window' has incorrect type " + * "(expected pygame.Window or pygame._sdl2._Window, got %s)"%window.__class__.__name__ + */ + /*else*/ { + + /* "pygame/_sdl2/video.pyx":1135 + * raise TypeError( + * "Argument 'window' has incorrect type " + * "(expected pygame.Window or pygame._sdl2._Window, got %s)"%window.__class__.__name__ # <<<<<<<<<<<<<< + * ) + * cdef Renderer self = cls.__new__(cls) + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_window, __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1135, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1135, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Argument_window_has_incorrect_ty, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1135, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "pygame/_sdl2/video.pyx":1133 + * _window = window + * else: + * raise TypeError( # <<<<<<<<<<<<<< + * "Argument 'window' has incorrect type " + * "(expected pygame.Window or pygame._sdl2._Window, got %s)"%window.__class__.__name__ + */ + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1133, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_Raise(__pyx_t_5, 0, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __PYX_ERR(0, 1133, __pyx_L1_error) + } + __pyx_L3:; + + /* "pygame/_sdl2/video.pyx":1137 + * "(expected pygame.Window or pygame._sdl2._Window, got %s)"%window.__class__.__name__ + * ) * cdef Renderer self = cls.__new__(cls) # <<<<<<<<<<<<<< - * self._win = window - * if window._is_borrowed: + * self._win = _window + * if self._win._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, 1127, __pyx_L1_error) + __PYX_ERR(0, 1137, __pyx_L1_error) } - __pyx_t_1 = __Pyx_tp_new(((PyObject *)__pyx_v_cls), __pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1127, __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, 1127, __pyx_L1_error) - __pyx_v_self = ((struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *)__pyx_t_1); - __pyx_t_1 = 0; + __pyx_t_5 = __Pyx_tp_new(((PyObject *)__pyx_v_cls), __pyx_empty_tuple); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1137, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (!(likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_6pygame_5_sdl2_5video_Renderer)))) __PYX_ERR(0, 1137, __pyx_L1_error) + __pyx_v_self = ((struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *)__pyx_t_5); + __pyx_t_5 = 0; - /* "pygame/_sdl2/video.pyx":1128 - * def from_window(cls, Window window): + /* "pygame/_sdl2/video.pyx":1138 + * ) * cdef Renderer self = cls.__new__(cls) - * self._win = window # <<<<<<<<<<<<<< - * if window._is_borrowed: + * self._win = _window # <<<<<<<<<<<<<< + * if self._win._is_borrowed: * self._is_borrowed=1 */ - __Pyx_INCREF(((PyObject *)__pyx_v_window)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_window)); + __Pyx_INCREF(((PyObject *)__pyx_v__window)); + __Pyx_GIVEREF(((PyObject *)__pyx_v__window)); __Pyx_GOTREF(__pyx_v_self->_win); __Pyx_DECREF(((PyObject *)__pyx_v_self->_win)); - __pyx_v_self->_win = __pyx_v_window; + __pyx_v_self->_win = __pyx_v__window; - /* "pygame/_sdl2/video.pyx":1129 + /* "pygame/_sdl2/video.pyx":1139 * cdef Renderer self = cls.__new__(cls) - * self._win = window - * if window._is_borrowed: # <<<<<<<<<<<<<< + * self._win = _window + * if self._win._is_borrowed: # <<<<<<<<<<<<<< * self._is_borrowed=1 * else: */ - __pyx_t_2 = (__pyx_v_window->_is_borrowed != 0); + __pyx_t_2 = (__pyx_v_self->_win->_is_borrowed != 0); if (likely(__pyx_t_2)) { - /* "pygame/_sdl2/video.pyx":1130 - * self._win = window - * if window._is_borrowed: + /* "pygame/_sdl2/video.pyx":1140 + * self._win = _window + * if self._win._is_borrowed: * self._is_borrowed=1 # <<<<<<<<<<<<<< * else: * raise error() */ __pyx_v_self->_is_borrowed = 1; - /* "pygame/_sdl2/video.pyx":1129 + /* "pygame/_sdl2/video.pyx":1139 * cdef Renderer self = cls.__new__(cls) - * self._win = window - * if window._is_borrowed: # <<<<<<<<<<<<<< + * self._win = _window + * if self._win._is_borrowed: # <<<<<<<<<<<<<< * self._is_borrowed=1 * else: */ - goto __pyx_L3; + goto __pyx_L6; } - /* "pygame/_sdl2/video.pyx":1132 + /* "pygame/_sdl2/video.pyx":1142 * self._is_borrowed=1 * else: * raise error() # <<<<<<<<<<<<<< @@ -16145,69 +16281,69 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_from_window(PyTypeObje * raise error() */ /*else*/ { - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1132, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = NULL; - if (CYTHON_UNPACK_METHODS && 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_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_error); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1142, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_3, function); + __Pyx_DECREF_SET(__pyx_t_4, function); } } - __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1132, __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, 1132, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1142, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_Raise(__pyx_t_5, 0, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __PYX_ERR(0, 1142, __pyx_L1_error) } - __pyx_L3:; + __pyx_L6:; - /* "pygame/_sdl2/video.pyx":1133 + /* "pygame/_sdl2/video.pyx":1143 * 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, 1133, __pyx_L1_error) - __pyx_t_5 = ((!__pyx_t_2) != 0); - if (unlikely(__pyx_t_5)) { + __pyx_t_2 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_self->_win)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1143, __pyx_L1_error) + __pyx_t_1 = ((!__pyx_t_2) != 0); + if (unlikely(__pyx_t_1)) { - /* "pygame/_sdl2/video.pyx":1134 + /* "pygame/_sdl2/video.pyx":1144 * 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, 1134, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = NULL; - if (CYTHON_UNPACK_METHODS && 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_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_error); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1144, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_3, function); + __Pyx_DECREF_SET(__pyx_t_4, function); } } - __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1134, __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, 1134, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1144, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_Raise(__pyx_t_5, 0, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __PYX_ERR(0, 1144, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":1133 + /* "pygame/_sdl2/video.pyx":1143 * else: * raise error() * if not self._win: # <<<<<<<<<<<<<< @@ -16216,7 +16352,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_from_window(PyTypeObje */ } - /* "pygame/_sdl2/video.pyx":1136 + /* "pygame/_sdl2/video.pyx":1146 * raise error() * * self._renderer = SDL_GetRenderer(self._win._win) # <<<<<<<<<<<<<< @@ -16225,45 +16361,45 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_from_window(PyTypeObje */ __pyx_v_self->_renderer = SDL_GetRenderer(__pyx_v_self->_win->_win); - /* "pygame/_sdl2/video.pyx":1137 + /* "pygame/_sdl2/video.pyx":1147 * * self._renderer = SDL_GetRenderer(self._win._win) * if not self._renderer: # <<<<<<<<<<<<<< * raise error() * */ - __pyx_t_5 = ((!(__pyx_v_self->_renderer != 0)) != 0); - if (unlikely(__pyx_t_5)) { + __pyx_t_1 = ((!(__pyx_v_self->_renderer != 0)) != 0); + if (unlikely(__pyx_t_1)) { - /* "pygame/_sdl2/video.pyx":1138 + /* "pygame/_sdl2/video.pyx":1148 * 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, 1138, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = NULL; - if (CYTHON_UNPACK_METHODS && 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_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_error); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1148, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_3, function); + __Pyx_DECREF_SET(__pyx_t_4, function); } } - __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1138, __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, 1138, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1148, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_Raise(__pyx_t_5, 0, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __PYX_ERR(0, 1148, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":1137 + /* "pygame/_sdl2/video.pyx":1147 * * self._renderer = SDL_GetRenderer(self._win._win) * if not self._renderer: # <<<<<<<<<<<<<< @@ -16272,36 +16408,36 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_from_window(PyTypeObje */ } - /* "pygame/_sdl2/video.pyx":1140 + /* "pygame/_sdl2/video.pyx":1150 * raise error() * * cdef Uint8[4] defaultColor = [255, 255, 255, 255] # <<<<<<<<<<<<<< * self._draw_color = pgColor_NewLength(defaultColor, 4) * self._target = None */ - __pyx_t_6[0] = 0xFF; - __pyx_t_6[1] = 0xFF; - __pyx_t_6[2] = 0xFF; - __pyx_t_6[3] = 0xFF; - memcpy(&(__pyx_v_defaultColor[0]), __pyx_t_6, sizeof(__pyx_v_defaultColor[0]) * (4)); + __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":1141 + /* "pygame/_sdl2/video.pyx":1151 * * 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, 1141, __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, 1141, __pyx_L1_error) - __Pyx_GIVEREF(__pyx_t_1); + __pyx_t_5 = pgColor_NewLength(__pyx_v_defaultColor, 4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1151, __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_Color))))) __PYX_ERR(0, 1151, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_5); __Pyx_GOTREF(__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; + __pyx_v_self->_draw_color = ((pgColorObject *)__pyx_t_5); + __pyx_t_5 = 0; - /* "pygame/_sdl2/video.pyx":1142 + /* "pygame/_sdl2/video.pyx":1152 * cdef Uint8[4] defaultColor = [255, 255, 255, 255] * self._draw_color = pgColor_NewLength(defaultColor, 4) * self._target = None # <<<<<<<<<<<<<< @@ -16314,44 +16450,45 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_from_window(PyTypeObje __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":1143 + /* "pygame/_sdl2/video.pyx":1153 * self._draw_color = pgColor_NewLength(defaultColor, 4) * self._target = None * return self # <<<<<<<<<<<<<< * - * def __init__(self, Window window, int index=-1, + * def __init__(self, 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":1126 + /* "pygame/_sdl2/video.pyx":1128 * * @classmethod - * def from_window(cls, Window window): # <<<<<<<<<<<<<< - * cdef Renderer self = cls.__new__(cls) - * self._win = window + * def from_window(cls, window): # <<<<<<<<<<<<<< + * cdef Window _window + * if isinstance(window,(_Window,Window)): */ /* 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_5); + __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pygame._sdl2.video.Renderer.from_window", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v__window); __Pyx_XDECREF((PyObject *)__pyx_v_self); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "pygame/_sdl2/video.pyx":1145 +/* "pygame/_sdl2/video.pyx":1155 * return self * - * def __init__(self, Window window, int index=-1, # <<<<<<<<<<<<<< + * def __init__(self, window, int index=-1, # <<<<<<<<<<<<<< * int accelerated=-1, bint vsync=False, * bint target_texture=False): */ @@ -16363,7 +16500,7 @@ static char __pyx_doc_6pygame_5_sdl2_5video_8Renderer_2__init__[] = "pygame obje 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; + PyObject *__pyx_v_window = 0; int __pyx_v_index; int __pyx_v_accelerated; int __pyx_v_vsync; @@ -16425,7 +16562,7 @@ static int __pyx_pw_6pygame_5_sdl2_5video_8Renderer_3__init__(PyObject *__pyx_v_ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1145, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1155, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -16442,24 +16579,24 @@ static int __pyx_pw_6pygame_5_sdl2_5video_8Renderer_3__init__(PyObject *__pyx_v_ default: goto __pyx_L5_argtuple_error; } } - __pyx_v_window = ((struct __pyx_obj_6pygame_5_sdl2_5video_Window *)values[0]); + __pyx_v_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, 1145, __pyx_L3_error) + __pyx_v_index = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_index == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1155, __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, 1146, __pyx_L3_error) + __pyx_v_accelerated = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_accelerated == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1156, __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, 1146, __pyx_L3_error) + __pyx_v_vsync = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_vsync == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1156, __pyx_L3_error) } else { - /* "pygame/_sdl2/video.pyx":1146 + /* "pygame/_sdl2/video.pyx":1156 * - * def __init__(self, Window window, int index=-1, + * def __init__(self, window, int index=-1, * int accelerated=-1, bint vsync=False, # <<<<<<<<<<<<<< * bint target_texture=False): * """pygame object wrapping a 2D rendering context for a window @@ -16467,11 +16604,11 @@ static int __pyx_pw_6pygame_5_sdl2_5video_8Renderer_3__init__(PyObject *__pyx_v_ __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, 1147, __pyx_L3_error) + __pyx_v_target_texture = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_target_texture == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1157, __pyx_L3_error) } else { - /* "pygame/_sdl2/video.pyx":1147 - * def __init__(self, Window window, int index=-1, + /* "pygame/_sdl2/video.pyx":1157 + * def __init__(self, window, int index=-1, * int accelerated=-1, bint vsync=False, * bint target_texture=False): # <<<<<<<<<<<<<< * """pygame object wrapping a 2D rendering context for a window @@ -16482,49 +16619,131 @@ static int __pyx_pw_6pygame_5_sdl2_5video_8Renderer_3__init__(PyObject *__pyx_v_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1145, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1155, __pyx_L3_error) __pyx_L3_error:; __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, 1145, __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":1145 + /* "pygame/_sdl2/video.pyx":1155 * return self * - * def __init__(self, Window window, int index=-1, # <<<<<<<<<<<<<< + * def __init__(self, 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:; __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) { +static int __pyx_pf_6pygame_5_sdl2_5video_8Renderer_2__init__(struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *__pyx_v_self, PyObject *__pyx_v_window, int __pyx_v_index, int __pyx_v_accelerated, int __pyx_v_vsync, int __pyx_v_target_texture) { + pgWindowObject *__pyx_v__window = 0; 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; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; - Uint8 __pyx_t_6[4]; + Uint32 __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + Uint8 __pyx_t_8[4]; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "pygame/_sdl2/video.pyx":1193 + /* "pygame/_sdl2/video.pyx":1202 + * """ + * cdef Window _window + * if isinstance(window,(_Window,Window)): # <<<<<<<<<<<<<< + * _window = window + * else: + */ + __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_window, __pyx_ptype_6pygame_5_sdl2_5video__Window); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_window, __pyx_ptype_6pygame_5_sdl2_5video_Window); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + __pyx_t_2 = (__pyx_t_1 != 0); + if (likely(__pyx_t_2)) { + + /* "pygame/_sdl2/video.pyx":1203 + * cdef Window _window + * if isinstance(window,(_Window,Window)): + * _window = window # <<<<<<<<<<<<<< + * else: + * raise TypeError( + */ + __pyx_t_4 = __pyx_v_window; + __Pyx_INCREF(__pyx_t_4); + __pyx_v__window = ((pgWindowObject *)__pyx_t_4); + __pyx_t_4 = 0; + + /* "pygame/_sdl2/video.pyx":1202 + * """ + * cdef Window _window + * if isinstance(window,(_Window,Window)): # <<<<<<<<<<<<<< + * _window = window + * else: + */ + goto __pyx_L3; + } + + /* "pygame/_sdl2/video.pyx":1205 + * _window = window + * else: + * raise TypeError( # <<<<<<<<<<<<<< + * "Argument 'window' has incorrect type " + * "(expected pygame.Window or pygame._sdl2._Window, got %s)"%window.__class__.__name__ + */ + /*else*/ { + + /* "pygame/_sdl2/video.pyx":1207 + * raise TypeError( + * "Argument 'window' has incorrect type " + * "(expected pygame.Window or pygame._sdl2._Window, got %s)"%window.__class__.__name__ # <<<<<<<<<<<<<< + * ) + * + */ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_window, __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1207, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1207, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Argument_window_has_incorrect_ty, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1207, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "pygame/_sdl2/video.pyx":1205 + * _window = window + * else: + * raise TypeError( # <<<<<<<<<<<<<< + * "Argument 'window' has incorrect type " + * "(expected pygame.Window or pygame._sdl2._Window, got %s)"%window.__class__.__name__ + */ + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1205, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_Raise(__pyx_t_5, 0, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __PYX_ERR(0, 1205, __pyx_L1_error) + } + __pyx_L3:; + + /* "pygame/_sdl2/video.pyx":1212 * # https://wiki.libsdl.org/SDL_CreateRenderer * # https://wiki.libsdl.org/SDL_RendererFlags * flags = 0 # <<<<<<<<<<<<<< @@ -16534,17 +16753,17 @@ static int __pyx_pf_6pygame_5_sdl2_5video_8Renderer_2__init__(struct __pyx_obj_6 __Pyx_INCREF(__pyx_int_0); __pyx_v_flags = __pyx_int_0; - /* "pygame/_sdl2/video.pyx":1194 + /* "pygame/_sdl2/video.pyx":1213 * # 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) != 0); - if (__pyx_t_1) { + __pyx_t_2 = ((__pyx_v_accelerated >= 0) != 0); + if (__pyx_t_2) { - /* "pygame/_sdl2/video.pyx":1195 + /* "pygame/_sdl2/video.pyx":1214 * flags = 0 * if accelerated >= 0: * flags |= _SDL_RENDERER_ACCELERATED if accelerated else _SDL_RENDERER_SOFTWARE # <<<<<<<<<<<<<< @@ -16552,23 +16771,23 @@ static int __pyx_pf_6pygame_5_sdl2_5video_8Renderer_2__init__(struct __pyx_obj_6 * flags |= _SDL_RENDERER_PRESENTVSYNC */ if ((__pyx_v_accelerated != 0)) { - __pyx_t_3 = __Pyx_PyInt_From_Uint32(SDL_RENDERER_ACCELERATED); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1195, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __pyx_t_3; - __pyx_t_3 = 0; + __pyx_t_4 = __Pyx_PyInt_From_Uint32(SDL_RENDERER_ACCELERATED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1214, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __pyx_t_4; + __pyx_t_4 = 0; } else { - __pyx_t_3 = __Pyx_PyInt_From_Uint32(SDL_RENDERER_SOFTWARE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1195, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __pyx_t_3; - __pyx_t_3 = 0; + __pyx_t_4 = __Pyx_PyInt_From_Uint32(SDL_RENDERER_SOFTWARE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1214, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __pyx_t_4; + __pyx_t_4 = 0; } - __pyx_t_3 = PyNumber_InPlaceOr(__pyx_v_flags, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1195, __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; + __pyx_t_4 = PyNumber_InPlaceOr(__pyx_v_flags, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1214, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF_SET(__pyx_v_flags, __pyx_t_4); + __pyx_t_4 = 0; - /* "pygame/_sdl2/video.pyx":1194 + /* "pygame/_sdl2/video.pyx":1213 * # https://wiki.libsdl.org/SDL_RendererFlags * flags = 0 * if accelerated >= 0: # <<<<<<<<<<<<<< @@ -16577,32 +16796,32 @@ static int __pyx_pf_6pygame_5_sdl2_5video_8Renderer_2__init__(struct __pyx_obj_6 */ } - /* "pygame/_sdl2/video.pyx":1196 + /* "pygame/_sdl2/video.pyx":1215 * if accelerated >= 0: * flags |= _SDL_RENDERER_ACCELERATED if accelerated else _SDL_RENDERER_SOFTWARE * if vsync: # <<<<<<<<<<<<<< * flags |= _SDL_RENDERER_PRESENTVSYNC * if target_texture: */ - __pyx_t_1 = (__pyx_v_vsync != 0); - if (__pyx_t_1) { + __pyx_t_2 = (__pyx_v_vsync != 0); + if (__pyx_t_2) { - /* "pygame/_sdl2/video.pyx":1197 + /* "pygame/_sdl2/video.pyx":1216 * 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, 1197, __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, 1197, __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; + __pyx_t_4 = __Pyx_PyInt_From_Uint32(SDL_RENDERER_PRESENTVSYNC); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1216, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyNumber_InPlaceOr(__pyx_v_flags, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1216, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF_SET(__pyx_v_flags, __pyx_t_5); + __pyx_t_5 = 0; - /* "pygame/_sdl2/video.pyx":1196 + /* "pygame/_sdl2/video.pyx":1215 * if accelerated >= 0: * flags |= _SDL_RENDERER_ACCELERATED if accelerated else _SDL_RENDERER_SOFTWARE * if vsync: # <<<<<<<<<<<<<< @@ -16611,32 +16830,32 @@ static int __pyx_pf_6pygame_5_sdl2_5video_8Renderer_2__init__(struct __pyx_obj_6 */ } - /* "pygame/_sdl2/video.pyx":1198 + /* "pygame/_sdl2/video.pyx":1217 * if vsync: * flags |= _SDL_RENDERER_PRESENTVSYNC * if target_texture: # <<<<<<<<<<<<<< * flags |= _SDL_RENDERER_TARGETTEXTURE * */ - __pyx_t_1 = (__pyx_v_target_texture != 0); - if (__pyx_t_1) { + __pyx_t_2 = (__pyx_v_target_texture != 0); + if (__pyx_t_2) { - /* "pygame/_sdl2/video.pyx":1199 + /* "pygame/_sdl2/video.pyx":1218 * flags |= _SDL_RENDERER_PRESENTVSYNC * if target_texture: * flags |= _SDL_RENDERER_TARGETTEXTURE # <<<<<<<<<<<<<< * - * self._renderer = SDL_CreateRenderer(window._win, index, flags) + * 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, 1199, __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, 1199, __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; + __pyx_t_5 = __Pyx_PyInt_From_Uint32(SDL_RENDERER_TARGETTEXTURE); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1218, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = PyNumber_InPlaceOr(__pyx_v_flags, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1218, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF_SET(__pyx_v_flags, __pyx_t_4); + __pyx_t_4 = 0; - /* "pygame/_sdl2/video.pyx":1198 + /* "pygame/_sdl2/video.pyx":1217 * if vsync: * flags |= _SDL_RENDERER_PRESENTVSYNC * if target_texture: # <<<<<<<<<<<<<< @@ -16645,97 +16864,97 @@ static int __pyx_pf_6pygame_5_sdl2_5video_8Renderer_2__init__(struct __pyx_obj_6 */ } - /* "pygame/_sdl2/video.pyx":1201 + /* "pygame/_sdl2/video.pyx":1220 * flags |= _SDL_RENDERER_TARGETTEXTURE * - * self._renderer = SDL_CreateRenderer(window._win, index, flags) # <<<<<<<<<<<<<< + * 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, 1201, __pyx_L1_error) - __pyx_v_self->_renderer = SDL_CreateRenderer(__pyx_v_window->_win, __pyx_v_index, __pyx_t_4); + __pyx_t_6 = __Pyx_PyInt_As_Uint32(__pyx_v_flags); if (unlikely((__pyx_t_6 == ((Uint32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1220, __pyx_L1_error) + __pyx_v_self->_renderer = SDL_CreateRenderer(__pyx_v__window->_win, __pyx_v_index, __pyx_t_6); - /* "pygame/_sdl2/video.pyx":1202 + /* "pygame/_sdl2/video.pyx":1221 * - * self._renderer = SDL_CreateRenderer(window._win, index, flags) + * self._renderer = SDL_CreateRenderer(_window._win, index, flags) * if not self._renderer: # <<<<<<<<<<<<<< * raise error() * */ - __pyx_t_1 = ((!(__pyx_v_self->_renderer != 0)) != 0); - if (unlikely(__pyx_t_1)) { + __pyx_t_2 = ((!(__pyx_v_self->_renderer != 0)) != 0); + if (unlikely(__pyx_t_2)) { - /* "pygame/_sdl2/video.pyx":1203 - * self._renderer = SDL_CreateRenderer(window._win, index, flags) + /* "pygame/_sdl2/video.pyx":1222 + * 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, 1203, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = NULL; - if (CYTHON_UNPACK_METHODS && 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_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_error); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1222, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(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_2, function); + __Pyx_DECREF_SET(__pyx_t_5, function); } } - __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1203, __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, 1203, __pyx_L1_error) + __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1222, __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, 1222, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":1202 + /* "pygame/_sdl2/video.pyx":1221 * - * self._renderer = SDL_CreateRenderer(window._win, index, flags) + * self._renderer = SDL_CreateRenderer(_window._win, index, flags) * if not self._renderer: # <<<<<<<<<<<<<< * raise error() * */ } - /* "pygame/_sdl2/video.pyx":1205 + /* "pygame/_sdl2/video.pyx":1224 * raise error() * * cdef Uint8[4] defaultColor = [255, 255, 255, 255] # <<<<<<<<<<<<<< * self._draw_color = pgColor_NewLength(defaultColor, 4) * self._target = None */ - __pyx_t_6[0] = 0xFF; - __pyx_t_6[1] = 0xFF; - __pyx_t_6[2] = 0xFF; - __pyx_t_6[3] = 0xFF; - memcpy(&(__pyx_v_defaultColor[0]), __pyx_t_6, sizeof(__pyx_v_defaultColor[0]) * (4)); + __pyx_t_8[0] = 0xFF; + __pyx_t_8[1] = 0xFF; + __pyx_t_8[2] = 0xFF; + __pyx_t_8[3] = 0xFF; + memcpy(&(__pyx_v_defaultColor[0]), __pyx_t_8, sizeof(__pyx_v_defaultColor[0]) * (4)); - /* "pygame/_sdl2/video.pyx":1206 + /* "pygame/_sdl2/video.pyx":1225 * * cdef Uint8[4] defaultColor = [255, 255, 255, 255] * self._draw_color = pgColor_NewLength(defaultColor, 4) # <<<<<<<<<<<<<< * self._target = None - * self._win = window + * self._win = _window */ - __pyx_t_3 = pgColor_NewLength(__pyx_v_defaultColor, 4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1206, __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, 1206, __pyx_L1_error) - __Pyx_GIVEREF(__pyx_t_3); + __pyx_t_4 = pgColor_NewLength(__pyx_v_defaultColor, 4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1225, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6pygame_5_sdl2_5video_Color))))) __PYX_ERR(0, 1225, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_4); __Pyx_GOTREF(__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; + __pyx_v_self->_draw_color = ((pgColorObject *)__pyx_t_4); + __pyx_t_4 = 0; - /* "pygame/_sdl2/video.pyx":1207 + /* "pygame/_sdl2/video.pyx":1226 * cdef Uint8[4] defaultColor = [255, 255, 255, 255] * self._draw_color = pgColor_NewLength(defaultColor, 4) * self._target = None # <<<<<<<<<<<<<< - * self._win = window + * self._win = _window * self._is_borrowed=0 */ __Pyx_INCREF(Py_None); @@ -16744,32 +16963,32 @@ static int __pyx_pf_6pygame_5_sdl2_5video_8Renderer_2__init__(struct __pyx_obj_6 __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":1208 + /* "pygame/_sdl2/video.pyx":1227 * self._draw_color = pgColor_NewLength(defaultColor, 4) * self._target = None - * self._win = window # <<<<<<<<<<<<<< + * self._win = _window # <<<<<<<<<<<<<< * self._is_borrowed=0 * */ - __Pyx_INCREF(((PyObject *)__pyx_v_window)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_window)); + __Pyx_INCREF(((PyObject *)__pyx_v__window)); + __Pyx_GIVEREF(((PyObject *)__pyx_v__window)); __Pyx_GOTREF(__pyx_v_self->_win); __Pyx_DECREF(((PyObject *)__pyx_v_self->_win)); - __pyx_v_self->_win = __pyx_v_window; + __pyx_v_self->_win = __pyx_v__window; - /* "pygame/_sdl2/video.pyx":1209 + /* "pygame/_sdl2/video.pyx":1228 * self._target = None - * self._win = window + * self._win = _window * self._is_borrowed=0 # <<<<<<<<<<<<<< * * def __dealloc__(self): */ __pyx_v_self->_is_borrowed = 0; - /* "pygame/_sdl2/video.pyx":1145 + /* "pygame/_sdl2/video.pyx":1155 * return self * - * def __init__(self, Window window, int index=-1, # <<<<<<<<<<<<<< + * def __init__(self, window, int index=-1, # <<<<<<<<<<<<<< * int accelerated=-1, bint vsync=False, * bint target_texture=False): */ @@ -16778,18 +16997,19 @@ static int __pyx_pf_6pygame_5_sdl2_5video_8Renderer_2__init__(struct __pyx_obj_6 __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_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("pygame._sdl2.video.Renderer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v__window); __Pyx_XDECREF(__pyx_v_flags); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "pygame/_sdl2/video.pyx":1211 +/* "pygame/_sdl2/video.pyx":1230 * self._is_borrowed=0 * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -16813,7 +17033,7 @@ static void __pyx_pf_6pygame_5_sdl2_5video_8Renderer_4__dealloc__(struct __pyx_o int __pyx_t_1; __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "pygame/_sdl2/video.pyx":1212 + /* "pygame/_sdl2/video.pyx":1231 * * def __dealloc__(self): * if self._is_borrowed: # <<<<<<<<<<<<<< @@ -16823,7 +17043,7 @@ static void __pyx_pf_6pygame_5_sdl2_5video_8Renderer_4__dealloc__(struct __pyx_o __pyx_t_1 = (__pyx_v_self->_is_borrowed != 0); if (__pyx_t_1) { - /* "pygame/_sdl2/video.pyx":1213 + /* "pygame/_sdl2/video.pyx":1232 * def __dealloc__(self): * if self._is_borrowed: * return # <<<<<<<<<<<<<< @@ -16832,7 +17052,7 @@ static void __pyx_pf_6pygame_5_sdl2_5video_8Renderer_4__dealloc__(struct __pyx_o */ goto __pyx_L0; - /* "pygame/_sdl2/video.pyx":1212 + /* "pygame/_sdl2/video.pyx":1231 * * def __dealloc__(self): * if self._is_borrowed: # <<<<<<<<<<<<<< @@ -16841,7 +17061,7 @@ static void __pyx_pf_6pygame_5_sdl2_5video_8Renderer_4__dealloc__(struct __pyx_o */ } - /* "pygame/_sdl2/video.pyx":1214 + /* "pygame/_sdl2/video.pyx":1233 * if self._is_borrowed: * return * if self._renderer: # <<<<<<<<<<<<<< @@ -16851,7 +17071,7 @@ static void __pyx_pf_6pygame_5_sdl2_5video_8Renderer_4__dealloc__(struct __pyx_o __pyx_t_1 = (__pyx_v_self->_renderer != 0); if (__pyx_t_1) { - /* "pygame/_sdl2/video.pyx":1215 + /* "pygame/_sdl2/video.pyx":1234 * return * if self._renderer: * SDL_DestroyRenderer(self._renderer) # <<<<<<<<<<<<<< @@ -16860,7 +17080,7 @@ static void __pyx_pf_6pygame_5_sdl2_5video_8Renderer_4__dealloc__(struct __pyx_o */ SDL_DestroyRenderer(__pyx_v_self->_renderer); - /* "pygame/_sdl2/video.pyx":1214 + /* "pygame/_sdl2/video.pyx":1233 * if self._is_borrowed: * return * if self._renderer: # <<<<<<<<<<<<<< @@ -16869,7 +17089,7 @@ static void __pyx_pf_6pygame_5_sdl2_5video_8Renderer_4__dealloc__(struct __pyx_o */ } - /* "pygame/_sdl2/video.pyx":1211 + /* "pygame/_sdl2/video.pyx":1230 * self._is_borrowed=0 * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -16882,7 +17102,7 @@ static void __pyx_pf_6pygame_5_sdl2_5video_8Renderer_4__dealloc__(struct __pyx_o __Pyx_RefNannyFinishContext(); } -/* "pygame/_sdl2/video.pyx":1218 +/* "pygame/_sdl2/video.pyx":1237 * * @property * def draw_blend_mode(self): # <<<<<<<<<<<<<< @@ -16917,7 +17137,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_15draw_blend_mode___ge int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "pygame/_sdl2/video.pyx":1223 + /* "pygame/_sdl2/video.pyx":1242 * # https://wiki.libsdl.org/SDL_GetRenderDrawBlendMode * cdef SDL_BlendMode blendMode * cdef int res = SDL_GetRenderDrawBlendMode(self._renderer, &blendMode) # <<<<<<<<<<<<<< @@ -16926,7 +17146,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_15draw_blend_mode___ge */ __pyx_v_res = SDL_GetRenderDrawBlendMode(__pyx_v_self->_renderer, (&__pyx_v_blendMode)); - /* "pygame/_sdl2/video.pyx":1224 + /* "pygame/_sdl2/video.pyx":1243 * cdef SDL_BlendMode blendMode * cdef int res = SDL_GetRenderDrawBlendMode(self._renderer, &blendMode) * if res < 0: # <<<<<<<<<<<<<< @@ -16936,14 +17156,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_15draw_blend_mode___ge __pyx_t_1 = ((__pyx_v_res < 0) != 0); if (unlikely(__pyx_t_1)) { - /* "pygame/_sdl2/video.pyx":1225 + /* "pygame/_sdl2/video.pyx":1244 * cdef int 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, 1225, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1244, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { @@ -16957,14 +17177,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_15draw_blend_mode___ge } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1225, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1244, __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, 1225, __pyx_L1_error) + __PYX_ERR(0, 1244, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":1224 + /* "pygame/_sdl2/video.pyx":1243 * cdef SDL_BlendMode blendMode * cdef int res = SDL_GetRenderDrawBlendMode(self._renderer, &blendMode) * if res < 0: # <<<<<<<<<<<<<< @@ -16973,7 +17193,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_15draw_blend_mode___ge */ } - /* "pygame/_sdl2/video.pyx":1227 + /* "pygame/_sdl2/video.pyx":1246 * raise error() * * return blendMode # <<<<<<<<<<<<<< @@ -16981,13 +17201,13 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_15draw_blend_mode___ge * @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, 1227, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_SDL_BlendMode(__pyx_v_blendMode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1246, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "pygame/_sdl2/video.pyx":1218 + /* "pygame/_sdl2/video.pyx":1237 * * @property * def draw_blend_mode(self): # <<<<<<<<<<<<<< @@ -17008,7 +17228,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_15draw_blend_mode___ge return __pyx_r; } -/* "pygame/_sdl2/video.pyx":1230 +/* "pygame/_sdl2/video.pyx":1249 * * @draw_blend_mode.setter * def draw_blend_mode(self, blendMode): # <<<<<<<<<<<<<< @@ -17043,17 +17263,17 @@ static int __pyx_pf_6pygame_5_sdl2_5video_8Renderer_15draw_blend_mode_2__set__(s int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - /* "pygame/_sdl2/video.pyx":1232 + /* "pygame/_sdl2/video.pyx":1251 * def draw_blend_mode(self, blendMode): * # https://wiki.libsdl.org/SDL_SetRenderDrawBlendMode * cdef int 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, 1232, __pyx_L1_error) + __pyx_t_1 = ((SDL_BlendMode)__Pyx_PyInt_As_SDL_BlendMode(__pyx_v_blendMode)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1251, __pyx_L1_error) __pyx_v_res = SDL_SetRenderDrawBlendMode(__pyx_v_self->_renderer, __pyx_t_1); - /* "pygame/_sdl2/video.pyx":1233 + /* "pygame/_sdl2/video.pyx":1252 * # https://wiki.libsdl.org/SDL_SetRenderDrawBlendMode * cdef int res = SDL_SetRenderDrawBlendMode(self._renderer, blendMode) * if res < 0: # <<<<<<<<<<<<<< @@ -17063,14 +17283,14 @@ static int __pyx_pf_6pygame_5_sdl2_5video_8Renderer_15draw_blend_mode_2__set__(s __pyx_t_2 = ((__pyx_v_res < 0) != 0); if (unlikely(__pyx_t_2)) { - /* "pygame/_sdl2/video.pyx":1234 + /* "pygame/_sdl2/video.pyx":1253 * cdef int 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, 1234, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_error); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1253, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { @@ -17084,14 +17304,14 @@ static int __pyx_pf_6pygame_5_sdl2_5video_8Renderer_15draw_blend_mode_2__set__(s } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1234, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1253, __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, 1234, __pyx_L1_error) + __PYX_ERR(0, 1253, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":1233 + /* "pygame/_sdl2/video.pyx":1252 * # https://wiki.libsdl.org/SDL_SetRenderDrawBlendMode * cdef int res = SDL_SetRenderDrawBlendMode(self._renderer, blendMode) * if res < 0: # <<<<<<<<<<<<<< @@ -17100,7 +17320,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_8Renderer_15draw_blend_mode_2__set__(s */ } - /* "pygame/_sdl2/video.pyx":1230 + /* "pygame/_sdl2/video.pyx":1249 * * @draw_blend_mode.setter * def draw_blend_mode(self, blendMode): # <<<<<<<<<<<<<< @@ -17122,7 +17342,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_8Renderer_15draw_blend_mode_2__set__(s return __pyx_r; } -/* "pygame/_sdl2/video.pyx":1237 +/* "pygame/_sdl2/video.pyx":1256 * * @property * def draw_color(self): # <<<<<<<<<<<<<< @@ -17148,7 +17368,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_10draw_color___get__(s __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); - /* "pygame/_sdl2/video.pyx":1240 + /* "pygame/_sdl2/video.pyx":1259 * """Get or set the color used for primitive drawing operations * """ * return self._draw_color # <<<<<<<<<<<<<< @@ -17160,7 +17380,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_10draw_color___get__(s __pyx_r = ((PyObject *)__pyx_v_self->_draw_color); goto __pyx_L0; - /* "pygame/_sdl2/video.pyx":1237 + /* "pygame/_sdl2/video.pyx":1256 * * @property * def draw_color(self): # <<<<<<<<<<<<<< @@ -17175,7 +17395,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_10draw_color___get__(s return __pyx_r; } -/* "pygame/_sdl2/video.pyx":1243 +/* "pygame/_sdl2/video.pyx":1262 * * @draw_color.setter * def draw_color(self, new_value): # <<<<<<<<<<<<<< @@ -17213,64 +17433,64 @@ static int __pyx_pf_6pygame_5_sdl2_5video_8Renderer_10draw_color_2__set__(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - /* "pygame/_sdl2/video.pyx":1245 + /* "pygame/_sdl2/video.pyx":1264 * def draw_color(self, new_value): * # https://wiki.libsdl.org/SDL_SetRenderDrawColor * self._draw_color[:] = new_value # <<<<<<<<<<<<<< * cdef int 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__31, 0, 0, 1) < 0) __PYX_ERR(0, 1245, __pyx_L1_error) + if (__Pyx_PyObject_SetSlice(((PyObject *)__pyx_v_self->_draw_color), __pyx_v_new_value, 0, 0, NULL, NULL, &__pyx_slice__31, 0, 0, 1) < 0) __PYX_ERR(0, 1264, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":1247 + /* "pygame/_sdl2/video.pyx":1266 * self._draw_color[:] = new_value * cdef int 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, 1247, __pyx_L1_error) + __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, 1266, __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, 1247, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_As_Uint8(__pyx_t_1); if (unlikely((__pyx_t_2 == ((Uint8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1266, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sdl2/video.pyx":1248 + /* "pygame/_sdl2/video.pyx":1267 * cdef int 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, 1248, __pyx_L1_error) + __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, 1267, __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, 1248, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_As_Uint8(__pyx_t_1); if (unlikely((__pyx_t_3 == ((Uint8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1267, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sdl2/video.pyx":1249 + /* "pygame/_sdl2/video.pyx":1268 * 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, 1249, __pyx_L1_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, 1268, __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, 1249, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_As_Uint8(__pyx_t_1); if (unlikely((__pyx_t_4 == ((Uint8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1268, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sdl2/video.pyx":1250 + /* "pygame/_sdl2/video.pyx":1269 * 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, 1250, __pyx_L1_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, 1269, __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, 1250, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_As_Uint8(__pyx_t_1); if (unlikely((__pyx_t_5 == ((Uint8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1269, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sdl2/video.pyx":1246 + /* "pygame/_sdl2/video.pyx":1265 * # https://wiki.libsdl.org/SDL_SetRenderDrawColor * self._draw_color[:] = new_value * cdef int res = SDL_SetRenderDrawColor(self._renderer, # <<<<<<<<<<<<<< @@ -17279,7 +17499,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_8Renderer_10draw_color_2__set__(struct */ __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":1251 + /* "pygame/_sdl2/video.pyx":1270 * new_value[2], * new_value[3]) * if res < 0: # <<<<<<<<<<<<<< @@ -17289,14 +17509,14 @@ static int __pyx_pf_6pygame_5_sdl2_5video_8Renderer_10draw_color_2__set__(struct __pyx_t_6 = ((__pyx_v_res < 0) != 0); if (unlikely(__pyx_t_6)) { - /* "pygame/_sdl2/video.pyx":1252 + /* "pygame/_sdl2/video.pyx":1271 * 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, 1252, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_error); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1271, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) { @@ -17310,14 +17530,14 @@ static int __pyx_pf_6pygame_5_sdl2_5video_8Renderer_10draw_color_2__set__(struct } __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1252, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1271, __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, 1252, __pyx_L1_error) + __PYX_ERR(0, 1271, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":1251 + /* "pygame/_sdl2/video.pyx":1270 * new_value[2], * new_value[3]) * if res < 0: # <<<<<<<<<<<<<< @@ -17326,7 +17546,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_8Renderer_10draw_color_2__set__(struct */ } - /* "pygame/_sdl2/video.pyx":1243 + /* "pygame/_sdl2/video.pyx":1262 * * @draw_color.setter * def draw_color(self, new_value): # <<<<<<<<<<<<<< @@ -17348,7 +17568,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_8Renderer_10draw_color_2__set__(struct return __pyx_r; } -/* "pygame/_sdl2/video.pyx":1254 +/* "pygame/_sdl2/video.pyx":1273 * raise error() * * def clear(self): # <<<<<<<<<<<<<< @@ -17383,7 +17603,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_6clear(struct __pyx_ob int __pyx_clineno = 0; __Pyx_RefNannySetupContext("clear", 0); - /* "pygame/_sdl2/video.pyx":1258 + /* "pygame/_sdl2/video.pyx":1277 * """ * # https://wiki.libsdl.org/SDL_RenderClear * cdef int res = SDL_RenderClear(self._renderer) # <<<<<<<<<<<<<< @@ -17392,7 +17612,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_6clear(struct __pyx_ob */ __pyx_v_res = SDL_RenderClear(__pyx_v_self->_renderer); - /* "pygame/_sdl2/video.pyx":1259 + /* "pygame/_sdl2/video.pyx":1278 * # https://wiki.libsdl.org/SDL_RenderClear * cdef int res = SDL_RenderClear(self._renderer) * if res < 0: # <<<<<<<<<<<<<< @@ -17402,14 +17622,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_6clear(struct __pyx_ob __pyx_t_1 = ((__pyx_v_res < 0) != 0); if (unlikely(__pyx_t_1)) { - /* "pygame/_sdl2/video.pyx":1260 + /* "pygame/_sdl2/video.pyx":1279 * cdef int 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, 1260, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1279, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { @@ -17423,14 +17643,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_6clear(struct __pyx_ob } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1260, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1279, __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, 1260, __pyx_L1_error) + __PYX_ERR(0, 1279, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":1259 + /* "pygame/_sdl2/video.pyx":1278 * # https://wiki.libsdl.org/SDL_RenderClear * cdef int res = SDL_RenderClear(self._renderer) * if res < 0: # <<<<<<<<<<<<<< @@ -17439,7 +17659,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_6clear(struct __pyx_ob */ } - /* "pygame/_sdl2/video.pyx":1254 + /* "pygame/_sdl2/video.pyx":1273 * raise error() * * def clear(self): # <<<<<<<<<<<<<< @@ -17462,7 +17682,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_6clear(struct __pyx_ob return __pyx_r; } -/* "pygame/_sdl2/video.pyx":1262 +/* "pygame/_sdl2/video.pyx":1281 * raise error() * * def present(self): # <<<<<<<<<<<<<< @@ -17489,7 +17709,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_8present(struct __pyx_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("present", 0); - /* "pygame/_sdl2/video.pyx":1269 + /* "pygame/_sdl2/video.pyx":1288 * """ * # https://wiki.libsdl.org/SDL_RenderPresent * SDL_RenderPresent(self._renderer) # <<<<<<<<<<<<<< @@ -17498,7 +17718,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_8present(struct __pyx_ */ SDL_RenderPresent(__pyx_v_self->_renderer); - /* "pygame/_sdl2/video.pyx":1262 + /* "pygame/_sdl2/video.pyx":1281 * raise error() * * def present(self): # <<<<<<<<<<<<<< @@ -17513,7 +17733,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_8present(struct __pyx_ return __pyx_r; } -/* "pygame/_sdl2/video.pyx":1271 +/* "pygame/_sdl2/video.pyx":1290 * SDL_RenderPresent(self._renderer) * * cpdef get_viewport(self): # <<<<<<<<<<<<<< @@ -17543,7 +17763,7 @@ static PyObject *__pyx_f_6pygame_5_sdl2_5video_8Renderer_get_viewport(struct __p if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_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, 1271, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_viewport); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1290, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pygame_5_sdl2_5video_8Renderer_11get_viewport)) { __Pyx_XDECREF(__pyx_r); @@ -17560,7 +17780,7 @@ static PyObject *__pyx_f_6pygame_5_sdl2_5video_8Renderer_get_viewport(struct __p } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1271, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1290, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; @@ -17581,7 +17801,7 @@ static PyObject *__pyx_f_6pygame_5_sdl2_5video_8Renderer_get_viewport(struct __p #endif } - /* "pygame/_sdl2/video.pyx":1276 + /* "pygame/_sdl2/video.pyx":1295 * # https://wiki.libsdl.org/SDL_RenderGetViewport * cdef SDL_Rect rect * SDL_RenderGetViewport(self._renderer, &rect) # <<<<<<<<<<<<<< @@ -17590,7 +17810,7 @@ static PyObject *__pyx_f_6pygame_5_sdl2_5video_8Renderer_get_viewport(struct __p */ SDL_RenderGetViewport(__pyx_v_self->_renderer, (&__pyx_v_rect)); - /* "pygame/_sdl2/video.pyx":1277 + /* "pygame/_sdl2/video.pyx":1296 * cdef SDL_Rect rect * SDL_RenderGetViewport(self._renderer, &rect) * return pgRect_New(&rect) # <<<<<<<<<<<<<< @@ -17598,13 +17818,13 @@ static PyObject *__pyx_f_6pygame_5_sdl2_5video_8Renderer_get_viewport(struct __p * def set_viewport(self, area): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = pgRect_New((&__pyx_v_rect)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1277, __pyx_L1_error) + __pyx_t_1 = pgRect_New((&__pyx_v_rect)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1296, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "pygame/_sdl2/video.pyx":1271 + /* "pygame/_sdl2/video.pyx":1290 * SDL_RenderPresent(self._renderer) * * cpdef get_viewport(self): # <<<<<<<<<<<<<< @@ -17649,7 +17869,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_10get_viewport(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_viewport", 0); __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, 1271, __pyx_L1_error) + __pyx_t_1 = __pyx_f_6pygame_5_sdl2_5video_8Renderer_get_viewport(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1290, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -17666,7 +17886,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_10get_viewport(struct return __pyx_r; } -/* "pygame/_sdl2/video.pyx":1279 +/* "pygame/_sdl2/video.pyx":1298 * return pgRect_New(&rect) * * def set_viewport(self, area): # <<<<<<<<<<<<<< @@ -17703,7 +17923,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_12set_viewport(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_viewport", 0); - /* "pygame/_sdl2/video.pyx":1287 + /* "pygame/_sdl2/video.pyx":1306 * """ * # https://wiki.libsdl.org/SDL_RenderSetViewport * if area is None: # <<<<<<<<<<<<<< @@ -17714,7 +17934,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_12set_viewport(struct __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "pygame/_sdl2/video.pyx":1288 + /* "pygame/_sdl2/video.pyx":1307 * # https://wiki.libsdl.org/SDL_RenderSetViewport * if area is None: * if SDL_RenderSetViewport(self._renderer, NULL) < 0: # <<<<<<<<<<<<<< @@ -17724,14 +17944,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_12set_viewport(struct __pyx_t_2 = ((SDL_RenderSetViewport(__pyx_v_self->_renderer, NULL) < 0) != 0); if (unlikely(__pyx_t_2)) { - /* "pygame/_sdl2/video.pyx":1289 + /* "pygame/_sdl2/video.pyx":1308 * if area is None: * if SDL_RenderSetViewport(self._renderer, NULL) < 0: * raise error() # <<<<<<<<<<<<<< * return * */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_error); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1289, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_error); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1308, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { @@ -17745,14 +17965,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_12set_viewport(struct } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1289, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1308, __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, 1289, __pyx_L1_error) + __PYX_ERR(0, 1308, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":1288 + /* "pygame/_sdl2/video.pyx":1307 * # https://wiki.libsdl.org/SDL_RenderSetViewport * if area is None: * if SDL_RenderSetViewport(self._renderer, NULL) < 0: # <<<<<<<<<<<<<< @@ -17761,7 +17981,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_12set_viewport(struct */ } - /* "pygame/_sdl2/video.pyx":1290 + /* "pygame/_sdl2/video.pyx":1309 * if SDL_RenderSetViewport(self._renderer, NULL) < 0: * raise error() * return # <<<<<<<<<<<<<< @@ -17772,7 +17992,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_12set_viewport(struct __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "pygame/_sdl2/video.pyx":1287 + /* "pygame/_sdl2/video.pyx":1306 * """ * # https://wiki.libsdl.org/SDL_RenderSetViewport * if area is None: # <<<<<<<<<<<<<< @@ -17781,7 +18001,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_12set_viewport(struct */ } - /* "pygame/_sdl2/video.pyx":1293 + /* "pygame/_sdl2/video.pyx":1312 * * cdef SDL_Rect tmprect * cdef SDL_Rect *rectptr = pgRect_FromObject(area, &tmprect) # <<<<<<<<<<<<<< @@ -17790,7 +18010,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_12set_viewport(struct */ __pyx_v_rectptr = pgRect_FromObject(__pyx_v_area, (&__pyx_v_tmprect)); - /* "pygame/_sdl2/video.pyx":1294 + /* "pygame/_sdl2/video.pyx":1313 * cdef SDL_Rect tmprect * cdef SDL_Rect *rectptr = pgRect_FromObject(area, &tmprect) * if rectptr == NULL: # <<<<<<<<<<<<<< @@ -17800,20 +18020,20 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_12set_viewport(struct __pyx_t_2 = ((__pyx_v_rectptr == NULL) != 0); if (unlikely(__pyx_t_2)) { - /* "pygame/_sdl2/video.pyx":1295 + /* "pygame/_sdl2/video.pyx":1314 * 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_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__32, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1295, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__32, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1314, __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, 1295, __pyx_L1_error) + __PYX_ERR(0, 1314, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":1294 + /* "pygame/_sdl2/video.pyx":1313 * cdef SDL_Rect tmprect * cdef SDL_Rect *rectptr = pgRect_FromObject(area, &tmprect) * if rectptr == NULL: # <<<<<<<<<<<<<< @@ -17822,7 +18042,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_12set_viewport(struct */ } - /* "pygame/_sdl2/video.pyx":1297 + /* "pygame/_sdl2/video.pyx":1316 * raise TypeError('expected a rectangle') * * if SDL_RenderSetViewport(self._renderer, rectptr) < 0: # <<<<<<<<<<<<<< @@ -17832,14 +18052,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_12set_viewport(struct __pyx_t_2 = ((SDL_RenderSetViewport(__pyx_v_self->_renderer, __pyx_v_rectptr) < 0) != 0); if (unlikely(__pyx_t_2)) { - /* "pygame/_sdl2/video.pyx":1298 + /* "pygame/_sdl2/video.pyx":1317 * * if SDL_RenderSetViewport(self._renderer, rectptr) < 0: * raise error() # <<<<<<<<<<<<<< * * @property */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_error); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1298, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_error); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1317, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { @@ -17853,14 +18073,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_12set_viewport(struct } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1298, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1317, __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, 1298, __pyx_L1_error) + __PYX_ERR(0, 1317, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":1297 + /* "pygame/_sdl2/video.pyx":1316 * raise TypeError('expected a rectangle') * * if SDL_RenderSetViewport(self._renderer, rectptr) < 0: # <<<<<<<<<<<<<< @@ -17869,7 +18089,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_12set_viewport(struct */ } - /* "pygame/_sdl2/video.pyx":1279 + /* "pygame/_sdl2/video.pyx":1298 * return pgRect_New(&rect) * * def set_viewport(self, area): # <<<<<<<<<<<<<< @@ -17892,7 +18112,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_12set_viewport(struct return __pyx_r; } -/* "pygame/_sdl2/video.pyx":1301 +/* "pygame/_sdl2/video.pyx":1320 * * @property * def logical_size(self): # <<<<<<<<<<<<<< @@ -17926,7 +18146,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_12logical_size___get__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "pygame/_sdl2/video.pyx":1306 + /* "pygame/_sdl2/video.pyx":1325 * cdef int w * cdef int h * SDL_RenderGetLogicalSize(self._renderer, &w, &h) # <<<<<<<<<<<<<< @@ -17935,7 +18155,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_12logical_size___get__ */ SDL_RenderGetLogicalSize(__pyx_v_self->_renderer, (&__pyx_v_w), (&__pyx_v_h)); - /* "pygame/_sdl2/video.pyx":1307 + /* "pygame/_sdl2/video.pyx":1326 * cdef int h * SDL_RenderGetLogicalSize(self._renderer, &w, &h) * return (w, h) # <<<<<<<<<<<<<< @@ -17943,11 +18163,11 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_12logical_size___get__ * @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, 1307, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_w); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1326, __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, 1307, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_h); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1326, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1307, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1326, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); @@ -17959,7 +18179,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_12logical_size___get__ __pyx_t_3 = 0; goto __pyx_L0; - /* "pygame/_sdl2/video.pyx":1301 + /* "pygame/_sdl2/video.pyx":1320 * * @property * def logical_size(self): # <<<<<<<<<<<<<< @@ -17980,7 +18200,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_12logical_size___get__ return __pyx_r; } -/* "pygame/_sdl2/video.pyx":1310 +/* "pygame/_sdl2/video.pyx":1329 * * @logical_size.setter * def logical_size(self, size): # <<<<<<<<<<<<<< @@ -18016,33 +18236,33 @@ static int __pyx_pf_6pygame_5_sdl2_5video_8Renderer_12logical_size_2__set__(stru int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - /* "pygame/_sdl2/video.pyx":1311 + /* "pygame/_sdl2/video.pyx":1330 * @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, 1311, __pyx_L1_error) + __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, 1330, __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, 1311, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1330, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_w = __pyx_t_2; - /* "pygame/_sdl2/video.pyx":1312 + /* "pygame/_sdl2/video.pyx":1331 * 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, 1312, __pyx_L1_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, 1331, __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, 1312, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1331, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_h = __pyx_t_2; - /* "pygame/_sdl2/video.pyx":1313 + /* "pygame/_sdl2/video.pyx":1332 * cdef int w = size[0] * cdef int h = size[1] * if (SDL_RenderSetLogicalSize(self._renderer, w, h) != 0): # <<<<<<<<<<<<<< @@ -18052,14 +18272,14 @@ static int __pyx_pf_6pygame_5_sdl2_5video_8Renderer_12logical_size_2__set__(stru __pyx_t_3 = ((SDL_RenderSetLogicalSize(__pyx_v_self->_renderer, __pyx_v_w, __pyx_v_h) != 0) != 0); if (unlikely(__pyx_t_3)) { - /* "pygame/_sdl2/video.pyx":1314 + /* "pygame/_sdl2/video.pyx":1333 * 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, 1314, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_error); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1333, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { @@ -18073,14 +18293,14 @@ static int __pyx_pf_6pygame_5_sdl2_5video_8Renderer_12logical_size_2__set__(stru } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1314, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1333, __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, 1314, __pyx_L1_error) + __PYX_ERR(0, 1333, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":1313 + /* "pygame/_sdl2/video.pyx":1332 * cdef int w = size[0] * cdef int h = size[1] * if (SDL_RenderSetLogicalSize(self._renderer, w, h) != 0): # <<<<<<<<<<<<<< @@ -18089,7 +18309,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_8Renderer_12logical_size_2__set__(stru */ } - /* "pygame/_sdl2/video.pyx":1310 + /* "pygame/_sdl2/video.pyx":1329 * * @logical_size.setter * def logical_size(self, size): # <<<<<<<<<<<<<< @@ -18111,7 +18331,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_8Renderer_12logical_size_2__set__(stru return __pyx_r; } -/* "pygame/_sdl2/video.pyx":1317 +/* "pygame/_sdl2/video.pyx":1336 * * @property * def scale(self): # <<<<<<<<<<<<<< @@ -18145,7 +18365,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_5scale___get__(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "pygame/_sdl2/video.pyx":1322 + /* "pygame/_sdl2/video.pyx":1341 * cdef float x * cdef float y * SDL_RenderGetScale(self._renderer, &x, &y) # <<<<<<<<<<<<<< @@ -18154,7 +18374,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_5scale___get__(struct */ SDL_RenderGetScale(__pyx_v_self->_renderer, (&__pyx_v_x), (&__pyx_v_y)); - /* "pygame/_sdl2/video.pyx":1323 + /* "pygame/_sdl2/video.pyx":1342 * cdef float y * SDL_RenderGetScale(self._renderer, &x, &y) * return (x, y) # <<<<<<<<<<<<<< @@ -18162,11 +18382,11 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_5scale___get__(struct * @scale.setter */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyFloat_FromDouble(__pyx_v_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1323, __pyx_L1_error) + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1342, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyFloat_FromDouble(__pyx_v_y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1323, __pyx_L1_error) + __pyx_t_2 = PyFloat_FromDouble(__pyx_v_y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1342, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1323, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1342, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); @@ -18178,7 +18398,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_5scale___get__(struct __pyx_t_3 = 0; goto __pyx_L0; - /* "pygame/_sdl2/video.pyx":1317 + /* "pygame/_sdl2/video.pyx":1336 * * @property * def scale(self): # <<<<<<<<<<<<<< @@ -18199,7 +18419,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_5scale___get__(struct return __pyx_r; } -/* "pygame/_sdl2/video.pyx":1326 +/* "pygame/_sdl2/video.pyx":1345 * * @scale.setter * def scale(self, scale): # <<<<<<<<<<<<<< @@ -18235,33 +18455,33 @@ static int __pyx_pf_6pygame_5_sdl2_5video_8Renderer_5scale_2__set__(struct __pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - /* "pygame/_sdl2/video.pyx":1327 + /* "pygame/_sdl2/video.pyx":1346 * @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, 1327, __pyx_L1_error) + __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, 1346, __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, 1327, __pyx_L1_error) + __pyx_t_2 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_2 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1346, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_x = __pyx_t_2; - /* "pygame/_sdl2/video.pyx":1328 + /* "pygame/_sdl2/video.pyx":1347 * 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, 1328, __pyx_L1_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, 1347, __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, 1328, __pyx_L1_error) + __pyx_t_2 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_2 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1347, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_y = __pyx_t_2; - /* "pygame/_sdl2/video.pyx":1329 + /* "pygame/_sdl2/video.pyx":1348 * cdef float x = scale[0] * cdef float y = scale[1] * if (SDL_RenderSetScale(self._renderer, x, y) != 0): # <<<<<<<<<<<<<< @@ -18271,14 +18491,14 @@ static int __pyx_pf_6pygame_5_sdl2_5video_8Renderer_5scale_2__set__(struct __pyx __pyx_t_3 = ((SDL_RenderSetScale(__pyx_v_self->_renderer, __pyx_v_x, __pyx_v_y) != 0) != 0); if (unlikely(__pyx_t_3)) { - /* "pygame/_sdl2/video.pyx":1330 + /* "pygame/_sdl2/video.pyx":1349 * 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, 1330, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_error); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1349, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { @@ -18292,14 +18512,14 @@ static int __pyx_pf_6pygame_5_sdl2_5video_8Renderer_5scale_2__set__(struct __pyx } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1330, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1349, __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, 1330, __pyx_L1_error) + __PYX_ERR(0, 1349, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":1329 + /* "pygame/_sdl2/video.pyx":1348 * cdef float x = scale[0] * cdef float y = scale[1] * if (SDL_RenderSetScale(self._renderer, x, y) != 0): # <<<<<<<<<<<<<< @@ -18308,7 +18528,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_8Renderer_5scale_2__set__(struct __pyx */ } - /* "pygame/_sdl2/video.pyx":1326 + /* "pygame/_sdl2/video.pyx":1345 * * @scale.setter * def scale(self, scale): # <<<<<<<<<<<<<< @@ -18330,7 +18550,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_8Renderer_5scale_2__set__(struct __pyx return __pyx_r; } -/* "pygame/_sdl2/video.pyx":1337 +/* "pygame/_sdl2/video.pyx":1356 * * @property * def target(self): # <<<<<<<<<<<<<< @@ -18356,7 +18576,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_6target___get__(struct __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); - /* "pygame/_sdl2/video.pyx":1345 + /* "pygame/_sdl2/video.pyx":1364 * """ * # https://wiki.libsdl.org/SDL_GetRenderTarget * return self._target # <<<<<<<<<<<<<< @@ -18368,7 +18588,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_6target___get__(struct __pyx_r = ((PyObject *)__pyx_v_self->_target); goto __pyx_L0; - /* "pygame/_sdl2/video.pyx":1337 + /* "pygame/_sdl2/video.pyx":1356 * * @property * def target(self): # <<<<<<<<<<<<<< @@ -18383,7 +18603,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_6target___get__(struct return __pyx_r; } -/* "pygame/_sdl2/video.pyx":1348 +/* "pygame/_sdl2/video.pyx":1367 * * @target.setter * def target(self, newtarget): # <<<<<<<<<<<<<< @@ -18417,7 +18637,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_8Renderer_6target_2__set__(struct __py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - /* "pygame/_sdl2/video.pyx":1350 + /* "pygame/_sdl2/video.pyx":1369 * def target(self, newtarget): * # https://wiki.libsdl.org/SDL_SetRenderTarget * if newtarget is None: # <<<<<<<<<<<<<< @@ -18428,7 +18648,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_8Renderer_6target_2__set__(struct __py __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "pygame/_sdl2/video.pyx":1351 + /* "pygame/_sdl2/video.pyx":1370 * # https://wiki.libsdl.org/SDL_SetRenderTarget * if newtarget is None: * self._target = None # <<<<<<<<<<<<<< @@ -18441,7 +18661,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_8Renderer_6target_2__set__(struct __py __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":1352 + /* "pygame/_sdl2/video.pyx":1371 * if newtarget is None: * self._target = None * if SDL_SetRenderTarget(self._renderer, NULL) < 0: # <<<<<<<<<<<<<< @@ -18451,14 +18671,14 @@ static int __pyx_pf_6pygame_5_sdl2_5video_8Renderer_6target_2__set__(struct __py __pyx_t_2 = ((SDL_SetRenderTarget(__pyx_v_self->_renderer, NULL) < 0) != 0); if (unlikely(__pyx_t_2)) { - /* "pygame/_sdl2/video.pyx":1353 + /* "pygame/_sdl2/video.pyx":1372 * self._target = None * if SDL_SetRenderTarget(self._renderer, NULL) < 0: * raise error() # <<<<<<<<<<<<<< * elif isinstance(newtarget, Texture): * self._target = newtarget */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_error); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1353, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_error); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1372, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { @@ -18472,14 +18692,14 @@ static int __pyx_pf_6pygame_5_sdl2_5video_8Renderer_6target_2__set__(struct __py } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1353, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1372, __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, 1353, __pyx_L1_error) + __PYX_ERR(0, 1372, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":1352 + /* "pygame/_sdl2/video.pyx":1371 * if newtarget is None: * self._target = None * if SDL_SetRenderTarget(self._renderer, NULL) < 0: # <<<<<<<<<<<<<< @@ -18488,7 +18708,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_8Renderer_6target_2__set__(struct __py */ } - /* "pygame/_sdl2/video.pyx":1350 + /* "pygame/_sdl2/video.pyx":1369 * def target(self, newtarget): * # https://wiki.libsdl.org/SDL_SetRenderTarget * if newtarget is None: # <<<<<<<<<<<<<< @@ -18498,7 +18718,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_8Renderer_6target_2__set__(struct __py goto __pyx_L3; } - /* "pygame/_sdl2/video.pyx":1354 + /* "pygame/_sdl2/video.pyx":1373 * if SDL_SetRenderTarget(self._renderer, NULL) < 0: * raise error() * elif isinstance(newtarget, Texture): # <<<<<<<<<<<<<< @@ -18509,14 +18729,14 @@ static int __pyx_pf_6pygame_5_sdl2_5video_8Renderer_6target_2__set__(struct __py __pyx_t_1 = (__pyx_t_2 != 0); if (likely(__pyx_t_1)) { - /* "pygame/_sdl2/video.pyx":1355 + /* "pygame/_sdl2/video.pyx":1374 * 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, 1355, __pyx_L1_error) + if (!(likely(((__pyx_v_newtarget) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_newtarget, __pyx_ptype_6pygame_5_sdl2_5video_Texture))))) __PYX_ERR(0, 1374, __pyx_L1_error) __pyx_t_3 = __pyx_v_newtarget; __Pyx_INCREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); @@ -18525,7 +18745,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_8Renderer_6target_2__set__(struct __py __pyx_v_self->_target = ((struct __pyx_obj_6pygame_5_sdl2_5video_Texture *)__pyx_t_3); __pyx_t_3 = 0; - /* "pygame/_sdl2/video.pyx":1357 + /* "pygame/_sdl2/video.pyx":1376 * self._target = newtarget * if SDL_SetRenderTarget(self._renderer, * self._target._tex) < 0: # <<<<<<<<<<<<<< @@ -18534,7 +18754,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_8Renderer_6target_2__set__(struct __py */ __pyx_t_1 = ((SDL_SetRenderTarget(__pyx_v_self->_renderer, __pyx_v_self->_target->_tex) < 0) != 0); - /* "pygame/_sdl2/video.pyx":1356 + /* "pygame/_sdl2/video.pyx":1375 * elif isinstance(newtarget, Texture): * self._target = newtarget * if SDL_SetRenderTarget(self._renderer, # <<<<<<<<<<<<<< @@ -18543,14 +18763,14 @@ static int __pyx_pf_6pygame_5_sdl2_5video_8Renderer_6target_2__set__(struct __py */ if (unlikely(__pyx_t_1)) { - /* "pygame/_sdl2/video.pyx":1358 + /* "pygame/_sdl2/video.pyx":1377 * 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_4, __pyx_n_s_error); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1358, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_error); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1377, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { @@ -18564,14 +18784,14 @@ static int __pyx_pf_6pygame_5_sdl2_5video_8Renderer_6target_2__set__(struct __py } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1358, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1377, __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, 1358, __pyx_L1_error) + __PYX_ERR(0, 1377, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":1356 + /* "pygame/_sdl2/video.pyx":1375 * elif isinstance(newtarget, Texture): * self._target = newtarget * if SDL_SetRenderTarget(self._renderer, # <<<<<<<<<<<<<< @@ -18580,7 +18800,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_8Renderer_6target_2__set__(struct __py */ } - /* "pygame/_sdl2/video.pyx":1354 + /* "pygame/_sdl2/video.pyx":1373 * if SDL_SetRenderTarget(self._renderer, NULL) < 0: * raise error() * elif isinstance(newtarget, Texture): # <<<<<<<<<<<<<< @@ -18590,7 +18810,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_8Renderer_6target_2__set__(struct __py goto __pyx_L3; } - /* "pygame/_sdl2/video.pyx":1360 + /* "pygame/_sdl2/video.pyx":1379 * raise error() * else: * raise TypeError('target must be a Texture or None') # <<<<<<<<<<<<<< @@ -18598,15 +18818,15 @@ static int __pyx_pf_6pygame_5_sdl2_5video_8Renderer_6target_2__set__(struct __py * cpdef object blit(self, object source, Rect dest=None, Rect area=None, int special_flags=0): */ /*else*/ { - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__33, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1360, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__33, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1379, __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, 1360, __pyx_L1_error) + __PYX_ERR(0, 1379, __pyx_L1_error) } __pyx_L3:; - /* "pygame/_sdl2/video.pyx":1348 + /* "pygame/_sdl2/video.pyx":1367 * * @target.setter * def target(self, newtarget): # <<<<<<<<<<<<<< @@ -18628,7 +18848,7 @@ static int __pyx_pf_6pygame_5_sdl2_5video_8Renderer_6target_2__set__(struct __py return __pyx_r; } -/* "pygame/_sdl2/video.pyx":1362 +/* "pygame/_sdl2/video.pyx":1381 * 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): # <<<<<<<<<<<<<< @@ -18678,11 +18898,11 @@ static PyObject *__pyx_f_6pygame_5_sdl2_5video_8Renderer_blit(struct __pyx_obj_6 if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_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, 1362, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_blit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1381, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(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, 1362, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_special_flags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1381, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL; @@ -18700,7 +18920,7 @@ static PyObject *__pyx_f_6pygame_5_sdl2_5video_8Renderer_blit(struct __pyx_obj_6 #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[5] = {__pyx_t_5, __pyx_v_source, ((PyObject *)__pyx_v_dest), ((PyObject *)__pyx_v_area), __pyx_t_3}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1362, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1381, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -18709,14 +18929,14 @@ static PyObject *__pyx_f_6pygame_5_sdl2_5video_8Renderer_blit(struct __pyx_obj_6 #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[5] = {__pyx_t_5, __pyx_v_source, ((PyObject *)__pyx_v_dest), ((PyObject *)__pyx_v_area), __pyx_t_3}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1362, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1381, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { - __pyx_t_7 = PyTuple_New(4+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1362, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(4+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1381, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; @@ -18733,7 +18953,7 @@ static PyObject *__pyx_f_6pygame_5_sdl2_5video_8Renderer_blit(struct __pyx_obj_6 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 3+__pyx_t_6, __pyx_t_3); __pyx_t_3 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1362, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1381, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } @@ -18756,7 +18976,7 @@ static PyObject *__pyx_f_6pygame_5_sdl2_5video_8Renderer_blit(struct __pyx_obj_6 #endif } - /* "pygame/_sdl2/video.pyx":1375 + /* "pygame/_sdl2/video.pyx":1394 * .. note:: Textures created by different Renderers cannot shared with each other! * """ * if isinstance(source, Texture): # <<<<<<<<<<<<<< @@ -18767,7 +18987,7 @@ static PyObject *__pyx_f_6pygame_5_sdl2_5video_8Renderer_blit(struct __pyx_obj_6 __pyx_t_9 = (__pyx_t_8 != 0); if (__pyx_t_9) { - /* "pygame/_sdl2/video.pyx":1376 + /* "pygame/_sdl2/video.pyx":1395 * """ * if isinstance(source, Texture): * (source).draw(area, dest) # <<<<<<<<<<<<<< @@ -18779,7 +18999,7 @@ static PyObject *__pyx_f_6pygame_5_sdl2_5video_8Renderer_blit(struct __pyx_obj_6 __pyx_t_10.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_10); - /* "pygame/_sdl2/video.pyx":1375 + /* "pygame/_sdl2/video.pyx":1394 * .. note:: Textures created by different Renderers cannot shared with each other! * """ * if isinstance(source, Texture): # <<<<<<<<<<<<<< @@ -18789,7 +19009,7 @@ static PyObject *__pyx_f_6pygame_5_sdl2_5video_8Renderer_blit(struct __pyx_obj_6 goto __pyx_L3; } - /* "pygame/_sdl2/video.pyx":1377 + /* "pygame/_sdl2/video.pyx":1396 * if isinstance(source, Texture): * (source).draw(area, dest) * elif isinstance(source, Image): # <<<<<<<<<<<<<< @@ -18800,7 +19020,7 @@ static PyObject *__pyx_f_6pygame_5_sdl2_5video_8Renderer_blit(struct __pyx_obj_6 __pyx_t_8 = (__pyx_t_9 != 0); if (__pyx_t_8) { - /* "pygame/_sdl2/video.pyx":1378 + /* "pygame/_sdl2/video.pyx":1397 * (source).draw(area, dest) * elif isinstance(source, Image): * (source).draw(area, dest) # <<<<<<<<<<<<<< @@ -18812,7 +19032,7 @@ static PyObject *__pyx_f_6pygame_5_sdl2_5video_8Renderer_blit(struct __pyx_obj_6 __pyx_t_11.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_11); - /* "pygame/_sdl2/video.pyx":1377 + /* "pygame/_sdl2/video.pyx":1396 * if isinstance(source, Texture): * (source).draw(area, dest) * elif isinstance(source, Image): # <<<<<<<<<<<<<< @@ -18822,31 +19042,31 @@ static PyObject *__pyx_f_6pygame_5_sdl2_5video_8Renderer_blit(struct __pyx_obj_6 goto __pyx_L3; } - /* "pygame/_sdl2/video.pyx":1379 + /* "pygame/_sdl2/video.pyx":1398 * elif isinstance(source, Image): * (source).draw(area, dest) * elif not hasattr(source, 'draw'): # <<<<<<<<<<<<<< * raise TypeError('source must be drawable') * else: */ - __pyx_t_8 = __Pyx_HasAttr(__pyx_v_source, __pyx_n_s_draw); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 1379, __pyx_L1_error) + __pyx_t_8 = __Pyx_HasAttr(__pyx_v_source, __pyx_n_s_draw); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 1398, __pyx_L1_error) __pyx_t_9 = ((!(__pyx_t_8 != 0)) != 0); if (unlikely(__pyx_t_9)) { - /* "pygame/_sdl2/video.pyx":1380 + /* "pygame/_sdl2/video.pyx":1399 * (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__34, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1380, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__34, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1399, __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, 1380, __pyx_L1_error) + __PYX_ERR(0, 1399, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":1379 + /* "pygame/_sdl2/video.pyx":1398 * elif isinstance(source, Image): * (source).draw(area, dest) * elif not hasattr(source, 'draw'): # <<<<<<<<<<<<<< @@ -18855,7 +19075,7 @@ static PyObject *__pyx_f_6pygame_5_sdl2_5video_8Renderer_blit(struct __pyx_obj_6 */ } - /* "pygame/_sdl2/video.pyx":1382 + /* "pygame/_sdl2/video.pyx":1401 * raise TypeError('source must be drawable') * else: * source.draw(area, dest) # <<<<<<<<<<<<<< @@ -18863,7 +19083,7 @@ static PyObject *__pyx_f_6pygame_5_sdl2_5video_8Renderer_blit(struct __pyx_obj_6 * 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, 1382, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_source, __pyx_n_s_draw); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1401, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; __pyx_t_6 = 0; @@ -18880,7 +19100,7 @@ static PyObject *__pyx_f_6pygame_5_sdl2_5video_8Renderer_blit(struct __pyx_obj_6 #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_area), ((PyObject *)__pyx_v_dest)}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1382, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1401, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -18888,13 +19108,13 @@ static PyObject *__pyx_f_6pygame_5_sdl2_5video_8Renderer_blit(struct __pyx_obj_6 #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_area), ((PyObject *)__pyx_v_dest)}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1382, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1401, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1382, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1401, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -18905,7 +19125,7 @@ static PyObject *__pyx_f_6pygame_5_sdl2_5video_8Renderer_blit(struct __pyx_obj_6 __Pyx_INCREF(((PyObject *)__pyx_v_dest)); __Pyx_GIVEREF(((PyObject *)__pyx_v_dest)); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, ((PyObject *)__pyx_v_dest)); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1382, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1401, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } @@ -18914,18 +19134,18 @@ static PyObject *__pyx_f_6pygame_5_sdl2_5video_8Renderer_blit(struct __pyx_obj_6 } __pyx_L3:; - /* "pygame/_sdl2/video.pyx":1384 + /* "pygame/_sdl2/video.pyx":1403 * source.draw(area, dest) * * if not dest: # <<<<<<<<<<<<<< * return self.get_viewport() * return dest */ - __pyx_t_9 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_dest)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1384, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_dest)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1403, __pyx_L1_error) __pyx_t_8 = ((!__pyx_t_9) != 0); if (__pyx_t_8) { - /* "pygame/_sdl2/video.pyx":1385 + /* "pygame/_sdl2/video.pyx":1404 * * if not dest: * return self.get_viewport() # <<<<<<<<<<<<<< @@ -18933,13 +19153,13 @@ static PyObject *__pyx_f_6pygame_5_sdl2_5video_8Renderer_blit(struct __pyx_obj_6 * */ __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, 1385, __pyx_L1_error) + __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, 1404, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "pygame/_sdl2/video.pyx":1384 + /* "pygame/_sdl2/video.pyx":1403 * source.draw(area, dest) * * if not dest: # <<<<<<<<<<<<<< @@ -18948,7 +19168,7 @@ static PyObject *__pyx_f_6pygame_5_sdl2_5video_8Renderer_blit(struct __pyx_obj_6 */ } - /* "pygame/_sdl2/video.pyx":1386 + /* "pygame/_sdl2/video.pyx":1405 * if not dest: * return self.get_viewport() * return dest # <<<<<<<<<<<<<< @@ -18960,7 +19180,7 @@ static PyObject *__pyx_f_6pygame_5_sdl2_5video_8Renderer_blit(struct __pyx_obj_6 __pyx_r = ((PyObject *)__pyx_v_dest); goto __pyx_L0; - /* "pygame/_sdl2/video.pyx":1362 + /* "pygame/_sdl2/video.pyx":1381 * 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): # <<<<<<<<<<<<<< @@ -19043,7 +19263,7 @@ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_8Renderer_15blit(PyObject *__pyx } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "blit") < 0)) __PYX_ERR(0, 1362, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "blit") < 0)) __PYX_ERR(0, 1381, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -19062,21 +19282,21 @@ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_8Renderer_15blit(PyObject *__pyx __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, 1362, __pyx_L3_error) + __pyx_v_special_flags = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_special_flags == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1381, __pyx_L3_error) } else { __pyx_v_special_flags = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("blit", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1362, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("blit", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1381, __pyx_L3_error) __pyx_L3_error:; __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, 1362, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_area), __pyx_ptype_6pygame_5_sdl2_5video_Rect, 1, "area", 0))) __PYX_ERR(0, 1362, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dest), __pyx_ptype_6pygame_5_sdl2_5video_Rect, 1, "dest", 0))) __PYX_ERR(0, 1381, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_area), __pyx_ptype_6pygame_5_sdl2_5video_Rect, 1, "area", 0))) __PYX_ERR(0, 1381, __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 */ @@ -19102,7 +19322,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_14blit(struct __pyx_ob __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, 1362, __pyx_L1_error) + __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, 1381, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -19119,7 +19339,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_14blit(struct __pyx_ob return __pyx_r; } -/* "pygame/_sdl2/video.pyx":1388 +/* "pygame/_sdl2/video.pyx":1407 * return dest * * def draw_line(self, p1, p2): # <<<<<<<<<<<<<< @@ -19162,11 +19382,11 @@ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_8Renderer_17draw_line(PyObject * case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_p2)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("draw_line", 1, 2, 2, 1); __PYX_ERR(0, 1388, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("draw_line", 1, 2, 2, 1); __PYX_ERR(0, 1407, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "draw_line") < 0)) __PYX_ERR(0, 1388, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "draw_line") < 0)) __PYX_ERR(0, 1407, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -19179,7 +19399,7 @@ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_8Renderer_17draw_line(PyObject * } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("draw_line", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1388, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("draw_line", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1407, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pygame._sdl2.video.Renderer.draw_line", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -19209,39 +19429,39 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_16draw_line(struct __p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("draw_line", 0); - /* "pygame/_sdl2/video.pyx":1396 + /* "pygame/_sdl2/video.pyx":1415 * # https://wiki.libsdl.org/SDL_RenderDrawLine * cdef int 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, 1396, __pyx_L1_error) + __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, 1415, __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, 1396, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1415, __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, 1396, __pyx_L1_error) + __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, 1415, __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, 1396, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1415, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sdl2/video.pyx":1397 + /* "pygame/_sdl2/video.pyx":1416 * cdef int 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, 1397, __pyx_L1_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, 1416, __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, 1397, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1416, __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, 1397, __pyx_L1_error) + __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, 1416, __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, 1397, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1416, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sdl2/video.pyx":1395 + /* "pygame/_sdl2/video.pyx":1414 * """ * # https://wiki.libsdl.org/SDL_RenderDrawLine * cdef int res = SDL_RenderDrawLine(self._renderer, # <<<<<<<<<<<<<< @@ -19250,7 +19470,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_16draw_line(struct __p */ __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":1398 + /* "pygame/_sdl2/video.pyx":1417 * p1[0], p1[1], * p2[0], p2[1]) * if res < 0: # <<<<<<<<<<<<<< @@ -19260,14 +19480,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_16draw_line(struct __p __pyx_t_6 = ((__pyx_v_res < 0) != 0); if (unlikely(__pyx_t_6)) { - /* "pygame/_sdl2/video.pyx":1399 + /* "pygame/_sdl2/video.pyx":1418 * 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, 1399, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_error); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1418, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) { @@ -19281,14 +19501,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_16draw_line(struct __p } __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1399, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1418, __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, 1399, __pyx_L1_error) + __PYX_ERR(0, 1418, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":1398 + /* "pygame/_sdl2/video.pyx":1417 * p1[0], p1[1], * p2[0], p2[1]) * if res < 0: # <<<<<<<<<<<<<< @@ -19297,7 +19517,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_16draw_line(struct __p */ } - /* "pygame/_sdl2/video.pyx":1388 + /* "pygame/_sdl2/video.pyx":1407 * return dest * * def draw_line(self, p1, p2): # <<<<<<<<<<<<<< @@ -19320,7 +19540,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_16draw_line(struct __p return __pyx_r; } -/* "pygame/_sdl2/video.pyx":1401 +/* "pygame/_sdl2/video.pyx":1420 * raise error() * * def draw_point(self, point): # <<<<<<<<<<<<<< @@ -19357,23 +19577,23 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_18draw_point(struct __ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("draw_point", 0); - /* "pygame/_sdl2/video.pyx":1408 + /* "pygame/_sdl2/video.pyx":1427 * # https://wiki.libsdl.org/SDL_RenderDrawPoint * cdef int 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, 1408, __pyx_L1_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, 1427, __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, 1408, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1427, __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, 1408, __pyx_L1_error) + __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, 1427, __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, 1408, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1427, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sdl2/video.pyx":1407 + /* "pygame/_sdl2/video.pyx":1426 * """ * # https://wiki.libsdl.org/SDL_RenderDrawPoint * cdef int res = SDL_RenderDrawPoint(self._renderer, # <<<<<<<<<<<<<< @@ -19382,7 +19602,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_18draw_point(struct __ */ __pyx_v_res = SDL_RenderDrawPoint(__pyx_v_self->_renderer, __pyx_t_2, __pyx_t_3); - /* "pygame/_sdl2/video.pyx":1409 + /* "pygame/_sdl2/video.pyx":1428 * cdef int res = SDL_RenderDrawPoint(self._renderer, * point[0], point[1]) * if res < 0: # <<<<<<<<<<<<<< @@ -19392,14 +19612,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_18draw_point(struct __ __pyx_t_4 = ((__pyx_v_res < 0) != 0); if (unlikely(__pyx_t_4)) { - /* "pygame/_sdl2/video.pyx":1410 + /* "pygame/_sdl2/video.pyx":1429 * 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, 1410, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_error); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1429, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { @@ -19413,14 +19633,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_18draw_point(struct __ } __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1410, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1429, __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, 1410, __pyx_L1_error) + __PYX_ERR(0, 1429, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":1409 + /* "pygame/_sdl2/video.pyx":1428 * cdef int res = SDL_RenderDrawPoint(self._renderer, * point[0], point[1]) * if res < 0: # <<<<<<<<<<<<<< @@ -19429,7 +19649,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_18draw_point(struct __ */ } - /* "pygame/_sdl2/video.pyx":1401 + /* "pygame/_sdl2/video.pyx":1420 * raise error() * * def draw_point(self, point): # <<<<<<<<<<<<<< @@ -19452,7 +19672,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_18draw_point(struct __ return __pyx_r; } -/* "pygame/_sdl2/video.pyx":1412 +/* "pygame/_sdl2/video.pyx":1431 * raise error() * * def draw_rect(self, rect): # <<<<<<<<<<<<<< @@ -19489,7 +19709,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_20draw_rect(struct __p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("draw_rect", 0); - /* "pygame/_sdl2/video.pyx":1419 + /* "pygame/_sdl2/video.pyx":1438 * # https://wiki.libsdl.org/SDL_RenderDrawRect * cdef SDL_Rect _rect * cdef SDL_Rect *rectptr = pgRect_FromObject(rect, &_rect) # <<<<<<<<<<<<<< @@ -19498,7 +19718,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_20draw_rect(struct __p */ __pyx_v_rectptr = pgRect_FromObject(__pyx_v_rect, (&__pyx_v__rect)); - /* "pygame/_sdl2/video.pyx":1421 + /* "pygame/_sdl2/video.pyx":1440 * cdef SDL_Rect *rectptr = pgRect_FromObject(rect, &_rect) * * if rectptr == NULL: # <<<<<<<<<<<<<< @@ -19508,20 +19728,20 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_20draw_rect(struct __p __pyx_t_1 = ((__pyx_v_rectptr == NULL) != 0); if (unlikely(__pyx_t_1)) { - /* "pygame/_sdl2/video.pyx":1422 + /* "pygame/_sdl2/video.pyx":1441 * * if rectptr == NULL: * raise TypeError('expected a rectangle') # <<<<<<<<<<<<<< * * cdef int res = SDL_RenderDrawRect(self._renderer, rectptr) */ - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__32, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1422, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__32, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1441, __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, 1422, __pyx_L1_error) + __PYX_ERR(0, 1441, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":1421 + /* "pygame/_sdl2/video.pyx":1440 * cdef SDL_Rect *rectptr = pgRect_FromObject(rect, &_rect) * * if rectptr == NULL: # <<<<<<<<<<<<<< @@ -19530,7 +19750,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_20draw_rect(struct __p */ } - /* "pygame/_sdl2/video.pyx":1424 + /* "pygame/_sdl2/video.pyx":1443 * raise TypeError('expected a rectangle') * * cdef int res = SDL_RenderDrawRect(self._renderer, rectptr) # <<<<<<<<<<<<<< @@ -19539,7 +19759,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_20draw_rect(struct __p */ __pyx_v_res = SDL_RenderDrawRect(__pyx_v_self->_renderer, __pyx_v_rectptr); - /* "pygame/_sdl2/video.pyx":1425 + /* "pygame/_sdl2/video.pyx":1444 * * cdef int res = SDL_RenderDrawRect(self._renderer, rectptr) * if res < 0: # <<<<<<<<<<<<<< @@ -19549,14 +19769,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_20draw_rect(struct __p __pyx_t_1 = ((__pyx_v_res < 0) != 0); if (unlikely(__pyx_t_1)) { - /* "pygame/_sdl2/video.pyx":1426 + /* "pygame/_sdl2/video.pyx":1445 * cdef int 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, 1426, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1445, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { @@ -19570,14 +19790,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_20draw_rect(struct __p } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1426, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1445, __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, 1426, __pyx_L1_error) + __PYX_ERR(0, 1445, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":1425 + /* "pygame/_sdl2/video.pyx":1444 * * cdef int res = SDL_RenderDrawRect(self._renderer, rectptr) * if res < 0: # <<<<<<<<<<<<<< @@ -19586,7 +19806,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_20draw_rect(struct __p */ } - /* "pygame/_sdl2/video.pyx":1412 + /* "pygame/_sdl2/video.pyx":1431 * raise error() * * def draw_rect(self, rect): # <<<<<<<<<<<<<< @@ -19609,7 +19829,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_20draw_rect(struct __p return __pyx_r; } -/* "pygame/_sdl2/video.pyx":1428 +/* "pygame/_sdl2/video.pyx":1447 * raise error() * * def fill_rect(self, rect): # <<<<<<<<<<<<<< @@ -19646,7 +19866,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_22fill_rect(struct __p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("fill_rect", 0); - /* "pygame/_sdl2/video.pyx":1435 + /* "pygame/_sdl2/video.pyx":1454 * # https://wiki.libsdl.org/SDL_RenderFillRect * cdef SDL_Rect _rect * cdef SDL_Rect *rectptr = pgRect_FromObject(rect, &_rect) # <<<<<<<<<<<<<< @@ -19655,7 +19875,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_22fill_rect(struct __p */ __pyx_v_rectptr = pgRect_FromObject(__pyx_v_rect, (&__pyx_v__rect)); - /* "pygame/_sdl2/video.pyx":1437 + /* "pygame/_sdl2/video.pyx":1456 * cdef SDL_Rect *rectptr = pgRect_FromObject(rect, &_rect) * * if rectptr == NULL: # <<<<<<<<<<<<<< @@ -19665,20 +19885,20 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_22fill_rect(struct __p __pyx_t_1 = ((__pyx_v_rectptr == NULL) != 0); if (unlikely(__pyx_t_1)) { - /* "pygame/_sdl2/video.pyx":1438 + /* "pygame/_sdl2/video.pyx":1457 * * if rectptr == NULL: * raise TypeError('expected a rectangle') # <<<<<<<<<<<<<< * * cdef int res = SDL_RenderFillRect(self._renderer, rectptr) */ - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__32, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1438, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__32, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1457, __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, 1438, __pyx_L1_error) + __PYX_ERR(0, 1457, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":1437 + /* "pygame/_sdl2/video.pyx":1456 * cdef SDL_Rect *rectptr = pgRect_FromObject(rect, &_rect) * * if rectptr == NULL: # <<<<<<<<<<<<<< @@ -19687,7 +19907,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_22fill_rect(struct __p */ } - /* "pygame/_sdl2/video.pyx":1440 + /* "pygame/_sdl2/video.pyx":1459 * raise TypeError('expected a rectangle') * * cdef int res = SDL_RenderFillRect(self._renderer, rectptr) # <<<<<<<<<<<<<< @@ -19696,7 +19916,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_22fill_rect(struct __p */ __pyx_v_res = SDL_RenderFillRect(__pyx_v_self->_renderer, __pyx_v_rectptr); - /* "pygame/_sdl2/video.pyx":1441 + /* "pygame/_sdl2/video.pyx":1460 * * cdef int res = SDL_RenderFillRect(self._renderer, rectptr) * if res < 0: # <<<<<<<<<<<<<< @@ -19706,14 +19926,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_22fill_rect(struct __p __pyx_t_1 = ((__pyx_v_res < 0) != 0); if (unlikely(__pyx_t_1)) { - /* "pygame/_sdl2/video.pyx":1442 + /* "pygame/_sdl2/video.pyx":1461 * cdef int res = SDL_RenderFillRect(self._renderer, rectptr) * if res < 0: * raise error() # <<<<<<<<<<<<<< * * def draw_triangle(self, p1, p2, p3): */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1442, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1461, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { @@ -19727,14 +19947,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_22fill_rect(struct __p } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1442, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1461, __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, 1442, __pyx_L1_error) + __PYX_ERR(0, 1461, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":1441 + /* "pygame/_sdl2/video.pyx":1460 * * cdef int res = SDL_RenderFillRect(self._renderer, rectptr) * if res < 0: # <<<<<<<<<<<<<< @@ -19743,7 +19963,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_22fill_rect(struct __p */ } - /* "pygame/_sdl2/video.pyx":1428 + /* "pygame/_sdl2/video.pyx":1447 * raise error() * * def fill_rect(self, rect): # <<<<<<<<<<<<<< @@ -19766,7 +19986,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_22fill_rect(struct __p return __pyx_r; } -/* "pygame/_sdl2/video.pyx":1444 +/* "pygame/_sdl2/video.pyx":1463 * raise error() * * def draw_triangle(self, p1, p2, p3): # <<<<<<<<<<<<<< @@ -19811,17 +20031,17 @@ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_8Renderer_25draw_triangle(PyObje case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_p2)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("draw_triangle", 1, 3, 3, 1); __PYX_ERR(0, 1444, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("draw_triangle", 1, 3, 3, 1); __PYX_ERR(0, 1463, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_p3)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("draw_triangle", 1, 3, 3, 2); __PYX_ERR(0, 1444, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("draw_triangle", 1, 3, 3, 2); __PYX_ERR(0, 1463, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "draw_triangle") < 0)) __PYX_ERR(0, 1444, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "draw_triangle") < 0)) __PYX_ERR(0, 1463, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -19836,7 +20056,7 @@ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_8Renderer_25draw_triangle(PyObje } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("draw_triangle", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1444, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("draw_triangle", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1463, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pygame._sdl2.video.Renderer.draw_triangle", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -19868,7 +20088,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_24draw_triangle(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("draw_triangle", 0); - /* "pygame/_sdl2/video.pyx":1447 + /* "pygame/_sdl2/video.pyx":1466 * # https://wiki.libsdl.org/SDL_RenderDrawLines * cdef SDL_Point points[4] * for i, pos in enumerate((p1, p2, p3, p1)): # <<<<<<<<<<<<<< @@ -19877,7 +20097,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_24draw_triangle(struct */ __Pyx_INCREF(__pyx_int_0); __pyx_t_1 = __pyx_int_0; - __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1447, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1466, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_p1); __Pyx_GIVEREF(__pyx_v_p1); @@ -19896,50 +20116,50 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_24draw_triangle(struct for (;;) { if (__pyx_t_4 >= 4) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 1447, __pyx_L1_error) + __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 1466, __pyx_L1_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1447, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1466, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif __Pyx_XDECREF_SET(__pyx_v_pos, __pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1); - __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1447, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1466, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = __pyx_t_2; __pyx_t_2 = 0; - /* "pygame/_sdl2/video.pyx":1448 + /* "pygame/_sdl2/video.pyx":1467 * cdef SDL_Point points[4] * for i, pos in enumerate((p1, p2, p3, p1)): * points[i].x = pos[0] # <<<<<<<<<<<<<< * points[i].y = pos[1] * */ - __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_pos, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1448, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_pos, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1467, __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, 1448, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1467, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1448, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1467, __pyx_L1_error) (__pyx_v_points[__pyx_t_6]).x = __pyx_t_5; - /* "pygame/_sdl2/video.pyx":1449 + /* "pygame/_sdl2/video.pyx":1468 * for i, pos in enumerate((p1, p2, p3, p1)): * points[i].x = pos[0] * points[i].y = pos[1] # <<<<<<<<<<<<<< * * res = SDL_RenderDrawLines(self._renderer, points, 4) */ - __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_pos, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1449, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_pos, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1468, __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, 1449, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1468, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1449, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1468, __pyx_L1_error) (__pyx_v_points[__pyx_t_6]).y = __pyx_t_5; - /* "pygame/_sdl2/video.pyx":1447 + /* "pygame/_sdl2/video.pyx":1466 * # https://wiki.libsdl.org/SDL_RenderDrawLines * cdef SDL_Point points[4] * for i, pos in enumerate((p1, p2, p3, p1)): # <<<<<<<<<<<<<< @@ -19950,7 +20170,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_24draw_triangle(struct __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sdl2/video.pyx":1451 + /* "pygame/_sdl2/video.pyx":1470 * points[i].y = pos[1] * * res = SDL_RenderDrawLines(self._renderer, points, 4) # <<<<<<<<<<<<<< @@ -19959,7 +20179,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_24draw_triangle(struct */ __pyx_v_res = SDL_RenderDrawLines(__pyx_v_self->_renderer, __pyx_v_points, 4); - /* "pygame/_sdl2/video.pyx":1452 + /* "pygame/_sdl2/video.pyx":1471 * * res = SDL_RenderDrawLines(self._renderer, points, 4) * if res < 0: # <<<<<<<<<<<<<< @@ -19969,14 +20189,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_24draw_triangle(struct __pyx_t_7 = ((__pyx_v_res < 0) != 0); if (unlikely(__pyx_t_7)) { - /* "pygame/_sdl2/video.pyx":1453 + /* "pygame/_sdl2/video.pyx":1472 * res = SDL_RenderDrawLines(self._renderer, points, 4) * if res < 0: * raise error() # <<<<<<<<<<<<<< * * def fill_triangle(self, p1, p2, p3): */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1453, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1472, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { @@ -19990,14 +20210,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_24draw_triangle(struct } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1453, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1472, __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, 1453, __pyx_L1_error) + __PYX_ERR(0, 1472, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":1452 + /* "pygame/_sdl2/video.pyx":1471 * * res = SDL_RenderDrawLines(self._renderer, points, 4) * if res < 0: # <<<<<<<<<<<<<< @@ -20006,7 +20226,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_24draw_triangle(struct */ } - /* "pygame/_sdl2/video.pyx":1444 + /* "pygame/_sdl2/video.pyx":1463 * raise error() * * def draw_triangle(self, p1, p2, p3): # <<<<<<<<<<<<<< @@ -20031,7 +20251,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_24draw_triangle(struct return __pyx_r; } -/* "pygame/_sdl2/video.pyx":1455 +/* "pygame/_sdl2/video.pyx":1474 * raise error() * * def fill_triangle(self, p1, p2, p3): # <<<<<<<<<<<<<< @@ -20076,17 +20296,17 @@ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_8Renderer_27fill_triangle(PyObje case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_p2)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("fill_triangle", 1, 3, 3, 1); __PYX_ERR(0, 1455, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("fill_triangle", 1, 3, 3, 1); __PYX_ERR(0, 1474, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_p3)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("fill_triangle", 1, 3, 3, 2); __PYX_ERR(0, 1455, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("fill_triangle", 1, 3, 3, 2); __PYX_ERR(0, 1474, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "fill_triangle") < 0)) __PYX_ERR(0, 1455, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "fill_triangle") < 0)) __PYX_ERR(0, 1474, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -20101,7 +20321,7 @@ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_8Renderer_27fill_triangle(PyObje } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("fill_triangle", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1455, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("fill_triangle", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1474, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pygame._sdl2.video.Renderer.fill_triangle", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -20134,7 +20354,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_26fill_triangle(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("fill_triangle", 0); - /* "pygame/_sdl2/video.pyx":1457 + /* "pygame/_sdl2/video.pyx":1476 * def fill_triangle(self, p1, p2, p3): * # https://wiki.libsdl.org/SDL_RenderGeometry * if not SDL_VERSION_ATLEAST(2, 0, 18): # <<<<<<<<<<<<<< @@ -20144,14 +20364,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_26fill_triangle(struct __pyx_t_1 = ((!(SDL_VERSION_ATLEAST(2, 0, 18) != 0)) != 0); if (unlikely(__pyx_t_1)) { - /* "pygame/_sdl2/video.pyx":1458 + /* "pygame/_sdl2/video.pyx":1477 * # https://wiki.libsdl.org/SDL_RenderGeometry * if not SDL_VERSION_ATLEAST(2, 0, 18): * raise error("fill_triangle requires SDL 2.0.18 or newer") # <<<<<<<<<<<<<< * * cdef SDL_Vertex vertices[3] */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1458, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1477, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { @@ -20165,14 +20385,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_26fill_triangle(struct } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_s_fill_triangle_requires_SDL_2_0_1) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_s_fill_triangle_requires_SDL_2_0_1); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1458, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1477, __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, 1458, __pyx_L1_error) + __PYX_ERR(0, 1477, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":1457 + /* "pygame/_sdl2/video.pyx":1476 * def fill_triangle(self, p1, p2, p3): * # https://wiki.libsdl.org/SDL_RenderGeometry * if not SDL_VERSION_ATLEAST(2, 0, 18): # <<<<<<<<<<<<<< @@ -20181,7 +20401,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_26fill_triangle(struct */ } - /* "pygame/_sdl2/video.pyx":1461 + /* "pygame/_sdl2/video.pyx":1480 * * cdef SDL_Vertex vertices[3] * for i, pos in enumerate((p1, p2, p3)): # <<<<<<<<<<<<<< @@ -20190,7 +20410,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_26fill_triangle(struct */ __Pyx_INCREF(__pyx_int_0); __pyx_t_2 = __pyx_int_0; - __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1461, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1480, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_p1); __Pyx_GIVEREF(__pyx_v_p1); @@ -20206,106 +20426,106 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_26fill_triangle(struct for (;;) { if (__pyx_t_5 >= 3) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1461, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1480, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1461, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1480, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_XDECREF_SET(__pyx_v_pos, __pyx_t_3); __pyx_t_3 = 0; __Pyx_INCREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2); - __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_2, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1461, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_2, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1480, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = __pyx_t_3; __pyx_t_3 = 0; - /* "pygame/_sdl2/video.pyx":1462 + /* "pygame/_sdl2/video.pyx":1481 * cdef SDL_Vertex vertices[3] * for i, pos in enumerate((p1, p2, p3)): * vertices[i].position.x = pos[0] # <<<<<<<<<<<<<< * vertices[i].position.y = pos[1] * vertices[i].color.r = self._draw_color[0] */ - __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_pos, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1462, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_pos, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1481, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_6 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1462, __pyx_L1_error) + __pyx_t_6 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_6 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1481, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1462, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1481, __pyx_L1_error) (__pyx_v_vertices[__pyx_t_7]).position.x = __pyx_t_6; - /* "pygame/_sdl2/video.pyx":1463 + /* "pygame/_sdl2/video.pyx":1482 * for i, pos in enumerate((p1, p2, p3)): * vertices[i].position.x = pos[0] * vertices[i].position.y = pos[1] # <<<<<<<<<<<<<< * vertices[i].color.r = self._draw_color[0] * vertices[i].color.g = self._draw_color[1] */ - __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_pos, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1463, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_pos, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1482, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_6 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1463, __pyx_L1_error) + __pyx_t_6 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_6 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1482, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1463, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1482, __pyx_L1_error) (__pyx_v_vertices[__pyx_t_7]).position.y = __pyx_t_6; - /* "pygame/_sdl2/video.pyx":1464 + /* "pygame/_sdl2/video.pyx":1483 * vertices[i].position.x = pos[0] * vertices[i].position.y = pos[1] * vertices[i].color.r = self._draw_color[0] # <<<<<<<<<<<<<< * vertices[i].color.g = self._draw_color[1] * vertices[i].color.b = self._draw_color[2] */ - __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_self->_draw_color), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1464, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_self->_draw_color), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1483, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_8 = __Pyx_PyInt_As_Uint8(__pyx_t_3); if (unlikely((__pyx_t_8 == ((Uint8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1464, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyInt_As_Uint8(__pyx_t_3); if (unlikely((__pyx_t_8 == ((Uint8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1483, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1464, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1483, __pyx_L1_error) (__pyx_v_vertices[__pyx_t_7]).color.r = __pyx_t_8; - /* "pygame/_sdl2/video.pyx":1465 + /* "pygame/_sdl2/video.pyx":1484 * vertices[i].position.y = pos[1] * vertices[i].color.r = self._draw_color[0] * vertices[i].color.g = self._draw_color[1] # <<<<<<<<<<<<<< * vertices[i].color.b = self._draw_color[2] * vertices[i].color.a = self._draw_color[3] */ - __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_self->_draw_color), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1465, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_self->_draw_color), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1484, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_8 = __Pyx_PyInt_As_Uint8(__pyx_t_3); if (unlikely((__pyx_t_8 == ((Uint8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1465, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyInt_As_Uint8(__pyx_t_3); if (unlikely((__pyx_t_8 == ((Uint8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1484, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1465, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1484, __pyx_L1_error) (__pyx_v_vertices[__pyx_t_7]).color.g = __pyx_t_8; - /* "pygame/_sdl2/video.pyx":1466 + /* "pygame/_sdl2/video.pyx":1485 * vertices[i].color.r = self._draw_color[0] * vertices[i].color.g = self._draw_color[1] * vertices[i].color.b = self._draw_color[2] # <<<<<<<<<<<<<< * vertices[i].color.a = self._draw_color[3] * */ - __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_self->_draw_color), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1466, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_self->_draw_color), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1485, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_8 = __Pyx_PyInt_As_Uint8(__pyx_t_3); if (unlikely((__pyx_t_8 == ((Uint8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1466, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyInt_As_Uint8(__pyx_t_3); if (unlikely((__pyx_t_8 == ((Uint8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1485, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1466, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1485, __pyx_L1_error) (__pyx_v_vertices[__pyx_t_7]).color.b = __pyx_t_8; - /* "pygame/_sdl2/video.pyx":1467 + /* "pygame/_sdl2/video.pyx":1486 * vertices[i].color.g = self._draw_color[1] * vertices[i].color.b = self._draw_color[2] * vertices[i].color.a = self._draw_color[3] # <<<<<<<<<<<<<< * * cdef int res = SDL_RenderGeometry(self._renderer, NULL, vertices, 3, NULL, 0) */ - __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_self->_draw_color), 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1467, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_self->_draw_color), 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1486, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_8 = __Pyx_PyInt_As_Uint8(__pyx_t_3); if (unlikely((__pyx_t_8 == ((Uint8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1467, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyInt_As_Uint8(__pyx_t_3); if (unlikely((__pyx_t_8 == ((Uint8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1486, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1467, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1486, __pyx_L1_error) (__pyx_v_vertices[__pyx_t_7]).color.a = __pyx_t_8; - /* "pygame/_sdl2/video.pyx":1461 + /* "pygame/_sdl2/video.pyx":1480 * * cdef SDL_Vertex vertices[3] * for i, pos in enumerate((p1, p2, p3)): # <<<<<<<<<<<<<< @@ -20316,7 +20536,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_26fill_triangle(struct __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sdl2/video.pyx":1469 + /* "pygame/_sdl2/video.pyx":1488 * vertices[i].color.a = self._draw_color[3] * * cdef int res = SDL_RenderGeometry(self._renderer, NULL, vertices, 3, NULL, 0) # <<<<<<<<<<<<<< @@ -20325,7 +20545,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_26fill_triangle(struct */ __pyx_v_res = SDL_RenderGeometry(__pyx_v_self->_renderer, NULL, __pyx_v_vertices, 3, NULL, 0); - /* "pygame/_sdl2/video.pyx":1470 + /* "pygame/_sdl2/video.pyx":1489 * * cdef int res = SDL_RenderGeometry(self._renderer, NULL, vertices, 3, NULL, 0) * if res < 0: # <<<<<<<<<<<<<< @@ -20335,14 +20555,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_26fill_triangle(struct __pyx_t_1 = ((__pyx_v_res < 0) != 0); if (unlikely(__pyx_t_1)) { - /* "pygame/_sdl2/video.pyx":1471 + /* "pygame/_sdl2/video.pyx":1490 * cdef int res = SDL_RenderGeometry(self._renderer, NULL, vertices, 3, NULL, 0) * if res < 0: * raise error() # <<<<<<<<<<<<<< * * def draw_quad(self, p1, p2, p3, p4): */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_error); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1471, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_error); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1490, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { @@ -20356,14 +20576,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_26fill_triangle(struct } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1471, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1490, __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, 1471, __pyx_L1_error) + __PYX_ERR(0, 1490, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":1470 + /* "pygame/_sdl2/video.pyx":1489 * * cdef int res = SDL_RenderGeometry(self._renderer, NULL, vertices, 3, NULL, 0) * if res < 0: # <<<<<<<<<<<<<< @@ -20372,7 +20592,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_26fill_triangle(struct */ } - /* "pygame/_sdl2/video.pyx":1455 + /* "pygame/_sdl2/video.pyx":1474 * raise error() * * def fill_triangle(self, p1, p2, p3): # <<<<<<<<<<<<<< @@ -20397,7 +20617,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_26fill_triangle(struct return __pyx_r; } -/* "pygame/_sdl2/video.pyx":1473 +/* "pygame/_sdl2/video.pyx":1492 * raise error() * * def draw_quad(self, p1, p2, p3, p4): # <<<<<<<<<<<<<< @@ -20445,23 +20665,23 @@ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_8Renderer_29draw_quad(PyObject * case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_p2)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("draw_quad", 1, 4, 4, 1); __PYX_ERR(0, 1473, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("draw_quad", 1, 4, 4, 1); __PYX_ERR(0, 1492, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_p3)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("draw_quad", 1, 4, 4, 2); __PYX_ERR(0, 1473, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("draw_quad", 1, 4, 4, 2); __PYX_ERR(0, 1492, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_p4)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("draw_quad", 1, 4, 4, 3); __PYX_ERR(0, 1473, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("draw_quad", 1, 4, 4, 3); __PYX_ERR(0, 1492, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "draw_quad") < 0)) __PYX_ERR(0, 1473, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "draw_quad") < 0)) __PYX_ERR(0, 1492, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; @@ -20478,7 +20698,7 @@ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_8Renderer_29draw_quad(PyObject * } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("draw_quad", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1473, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("draw_quad", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1492, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pygame._sdl2.video.Renderer.draw_quad", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -20510,7 +20730,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_28draw_quad(struct __p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("draw_quad", 0); - /* "pygame/_sdl2/video.pyx":1476 + /* "pygame/_sdl2/video.pyx":1495 * # https://wiki.libsdl.org/SDL_RenderDrawLines * cdef SDL_Point points[5] * for i, pos in enumerate((p1, p2, p3, p4, p1)): # <<<<<<<<<<<<<< @@ -20519,7 +20739,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_28draw_quad(struct __p */ __Pyx_INCREF(__pyx_int_0); __pyx_t_1 = __pyx_int_0; - __pyx_t_2 = PyTuple_New(5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1476, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1495, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_p1); __Pyx_GIVEREF(__pyx_v_p1); @@ -20541,50 +20761,50 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_28draw_quad(struct __p for (;;) { if (__pyx_t_4 >= 5) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 1476, __pyx_L1_error) + __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 1495, __pyx_L1_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1476, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1495, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif __Pyx_XDECREF_SET(__pyx_v_pos, __pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1); - __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1476, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1495, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = __pyx_t_2; __pyx_t_2 = 0; - /* "pygame/_sdl2/video.pyx":1477 + /* "pygame/_sdl2/video.pyx":1496 * cdef SDL_Point points[5] * for i, pos in enumerate((p1, p2, p3, p4, p1)): * points[i].x = pos[0] # <<<<<<<<<<<<<< * points[i].y = pos[1] * */ - __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_pos, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1477, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_pos, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1496, __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, 1477, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1496, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1477, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1496, __pyx_L1_error) (__pyx_v_points[__pyx_t_6]).x = __pyx_t_5; - /* "pygame/_sdl2/video.pyx":1478 + /* "pygame/_sdl2/video.pyx":1497 * for i, pos in enumerate((p1, p2, p3, p4, p1)): * points[i].x = pos[0] * points[i].y = pos[1] # <<<<<<<<<<<<<< * * res = SDL_RenderDrawLines(self._renderer, points, 5) */ - __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_pos, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1478, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_pos, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1497, __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, 1478, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1497, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1478, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1497, __pyx_L1_error) (__pyx_v_points[__pyx_t_6]).y = __pyx_t_5; - /* "pygame/_sdl2/video.pyx":1476 + /* "pygame/_sdl2/video.pyx":1495 * # https://wiki.libsdl.org/SDL_RenderDrawLines * cdef SDL_Point points[5] * for i, pos in enumerate((p1, p2, p3, p4, p1)): # <<<<<<<<<<<<<< @@ -20595,7 +20815,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_28draw_quad(struct __p __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sdl2/video.pyx":1480 + /* "pygame/_sdl2/video.pyx":1499 * points[i].y = pos[1] * * res = SDL_RenderDrawLines(self._renderer, points, 5) # <<<<<<<<<<<<<< @@ -20604,7 +20824,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_28draw_quad(struct __p */ __pyx_v_res = SDL_RenderDrawLines(__pyx_v_self->_renderer, __pyx_v_points, 5); - /* "pygame/_sdl2/video.pyx":1481 + /* "pygame/_sdl2/video.pyx":1500 * * res = SDL_RenderDrawLines(self._renderer, points, 5) * if res < 0: # <<<<<<<<<<<<<< @@ -20614,14 +20834,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_28draw_quad(struct __p __pyx_t_7 = ((__pyx_v_res < 0) != 0); if (unlikely(__pyx_t_7)) { - /* "pygame/_sdl2/video.pyx":1482 + /* "pygame/_sdl2/video.pyx":1501 * res = SDL_RenderDrawLines(self._renderer, points, 5) * if res < 0: * raise error() # <<<<<<<<<<<<<< * * def fill_quad(self, p1, p2, p3, p4): */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1482, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1501, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { @@ -20635,14 +20855,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_28draw_quad(struct __p } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1482, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1501, __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, 1482, __pyx_L1_error) + __PYX_ERR(0, 1501, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":1481 + /* "pygame/_sdl2/video.pyx":1500 * * res = SDL_RenderDrawLines(self._renderer, points, 5) * if res < 0: # <<<<<<<<<<<<<< @@ -20651,7 +20871,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_28draw_quad(struct __p */ } - /* "pygame/_sdl2/video.pyx":1473 + /* "pygame/_sdl2/video.pyx":1492 * raise error() * * def draw_quad(self, p1, p2, p3, p4): # <<<<<<<<<<<<<< @@ -20676,7 +20896,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_28draw_quad(struct __p return __pyx_r; } -/* "pygame/_sdl2/video.pyx":1484 +/* "pygame/_sdl2/video.pyx":1503 * raise error() * * def fill_quad(self, p1, p2, p3, p4): # <<<<<<<<<<<<<< @@ -20724,23 +20944,23 @@ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_8Renderer_31fill_quad(PyObject * case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_p2)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("fill_quad", 1, 4, 4, 1); __PYX_ERR(0, 1484, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("fill_quad", 1, 4, 4, 1); __PYX_ERR(0, 1503, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_p3)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("fill_quad", 1, 4, 4, 2); __PYX_ERR(0, 1484, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("fill_quad", 1, 4, 4, 2); __PYX_ERR(0, 1503, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_p4)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("fill_quad", 1, 4, 4, 3); __PYX_ERR(0, 1484, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("fill_quad", 1, 4, 4, 3); __PYX_ERR(0, 1503, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "fill_quad") < 0)) __PYX_ERR(0, 1484, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "fill_quad") < 0)) __PYX_ERR(0, 1503, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; @@ -20757,7 +20977,7 @@ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_8Renderer_31fill_quad(PyObject * } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("fill_quad", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1484, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("fill_quad", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1503, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pygame._sdl2.video.Renderer.fill_quad", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -20790,7 +21010,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_30fill_quad(struct __p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("fill_quad", 0); - /* "pygame/_sdl2/video.pyx":1486 + /* "pygame/_sdl2/video.pyx":1505 * def fill_quad(self, p1, p2, p3, p4): * # https://wiki.libsdl.org/SDL_RenderGeometry * if not SDL_VERSION_ATLEAST(2, 0, 18): # <<<<<<<<<<<<<< @@ -20800,14 +21020,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_30fill_quad(struct __p __pyx_t_1 = ((!(SDL_VERSION_ATLEAST(2, 0, 18) != 0)) != 0); if (unlikely(__pyx_t_1)) { - /* "pygame/_sdl2/video.pyx":1487 + /* "pygame/_sdl2/video.pyx":1506 * # https://wiki.libsdl.org/SDL_RenderGeometry * if not SDL_VERSION_ATLEAST(2, 0, 18): * raise error("fill_quad requires SDL 2.0.18 or newer") # <<<<<<<<<<<<<< * * cdef SDL_Vertex vertices[6] */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1487, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1506, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { @@ -20821,14 +21041,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_30fill_quad(struct __p } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_s_fill_quad_requires_SDL_2_0_18_or) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_s_fill_quad_requires_SDL_2_0_18_or); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1487, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1506, __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, 1487, __pyx_L1_error) + __PYX_ERR(0, 1506, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":1486 + /* "pygame/_sdl2/video.pyx":1505 * def fill_quad(self, p1, p2, p3, p4): * # https://wiki.libsdl.org/SDL_RenderGeometry * if not SDL_VERSION_ATLEAST(2, 0, 18): # <<<<<<<<<<<<<< @@ -20837,7 +21057,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_30fill_quad(struct __p */ } - /* "pygame/_sdl2/video.pyx":1490 + /* "pygame/_sdl2/video.pyx":1509 * * cdef SDL_Vertex vertices[6] * for i, pos in enumerate((p1, p2, p3, p3, p4, p1)): # <<<<<<<<<<<<<< @@ -20846,7 +21066,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_30fill_quad(struct __p */ __Pyx_INCREF(__pyx_int_0); __pyx_t_2 = __pyx_int_0; - __pyx_t_3 = PyTuple_New(6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1490, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1509, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_p1); __Pyx_GIVEREF(__pyx_v_p1); @@ -20871,106 +21091,106 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_30fill_quad(struct __p for (;;) { if (__pyx_t_5 >= 6) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1490, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1509, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1490, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1509, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_XDECREF_SET(__pyx_v_pos, __pyx_t_3); __pyx_t_3 = 0; __Pyx_INCREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2); - __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_2, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1490, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_2, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1509, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = __pyx_t_3; __pyx_t_3 = 0; - /* "pygame/_sdl2/video.pyx":1491 + /* "pygame/_sdl2/video.pyx":1510 * cdef SDL_Vertex vertices[6] * for i, pos in enumerate((p1, p2, p3, p3, p4, p1)): * vertices[i].position.x = pos[0] # <<<<<<<<<<<<<< * vertices[i].position.y = pos[1] * vertices[i].color.r = self._draw_color[0] */ - __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_pos, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1491, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_pos, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1510, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_6 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1491, __pyx_L1_error) + __pyx_t_6 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_6 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1510, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1491, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1510, __pyx_L1_error) (__pyx_v_vertices[__pyx_t_7]).position.x = __pyx_t_6; - /* "pygame/_sdl2/video.pyx":1492 + /* "pygame/_sdl2/video.pyx":1511 * for i, pos in enumerate((p1, p2, p3, p3, p4, p1)): * vertices[i].position.x = pos[0] * vertices[i].position.y = pos[1] # <<<<<<<<<<<<<< * vertices[i].color.r = self._draw_color[0] * vertices[i].color.g = self._draw_color[1] */ - __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_pos, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1492, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_pos, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1511, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_6 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1492, __pyx_L1_error) + __pyx_t_6 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_6 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1511, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1492, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1511, __pyx_L1_error) (__pyx_v_vertices[__pyx_t_7]).position.y = __pyx_t_6; - /* "pygame/_sdl2/video.pyx":1493 + /* "pygame/_sdl2/video.pyx":1512 * vertices[i].position.x = pos[0] * vertices[i].position.y = pos[1] * vertices[i].color.r = self._draw_color[0] # <<<<<<<<<<<<<< * vertices[i].color.g = self._draw_color[1] * vertices[i].color.b = self._draw_color[2] */ - __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_self->_draw_color), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1493, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_self->_draw_color), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1512, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_8 = __Pyx_PyInt_As_Uint8(__pyx_t_3); if (unlikely((__pyx_t_8 == ((Uint8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1493, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyInt_As_Uint8(__pyx_t_3); if (unlikely((__pyx_t_8 == ((Uint8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1512, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1493, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1512, __pyx_L1_error) (__pyx_v_vertices[__pyx_t_7]).color.r = __pyx_t_8; - /* "pygame/_sdl2/video.pyx":1494 + /* "pygame/_sdl2/video.pyx":1513 * vertices[i].position.y = pos[1] * vertices[i].color.r = self._draw_color[0] * vertices[i].color.g = self._draw_color[1] # <<<<<<<<<<<<<< * vertices[i].color.b = self._draw_color[2] * vertices[i].color.a = self._draw_color[3] */ - __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_self->_draw_color), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1494, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_self->_draw_color), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1513, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_8 = __Pyx_PyInt_As_Uint8(__pyx_t_3); if (unlikely((__pyx_t_8 == ((Uint8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1494, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyInt_As_Uint8(__pyx_t_3); if (unlikely((__pyx_t_8 == ((Uint8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1513, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1494, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1513, __pyx_L1_error) (__pyx_v_vertices[__pyx_t_7]).color.g = __pyx_t_8; - /* "pygame/_sdl2/video.pyx":1495 + /* "pygame/_sdl2/video.pyx":1514 * vertices[i].color.r = self._draw_color[0] * vertices[i].color.g = self._draw_color[1] * vertices[i].color.b = self._draw_color[2] # <<<<<<<<<<<<<< * vertices[i].color.a = self._draw_color[3] * */ - __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_self->_draw_color), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1495, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_self->_draw_color), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1514, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_8 = __Pyx_PyInt_As_Uint8(__pyx_t_3); if (unlikely((__pyx_t_8 == ((Uint8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1495, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyInt_As_Uint8(__pyx_t_3); if (unlikely((__pyx_t_8 == ((Uint8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1514, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1495, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1514, __pyx_L1_error) (__pyx_v_vertices[__pyx_t_7]).color.b = __pyx_t_8; - /* "pygame/_sdl2/video.pyx":1496 + /* "pygame/_sdl2/video.pyx":1515 * vertices[i].color.g = self._draw_color[1] * vertices[i].color.b = self._draw_color[2] * vertices[i].color.a = self._draw_color[3] # <<<<<<<<<<<<<< * * cdef int res = SDL_RenderGeometry(self._renderer, NULL, vertices, 6, NULL, 0) */ - __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_self->_draw_color), 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1496, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_self->_draw_color), 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1515, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_8 = __Pyx_PyInt_As_Uint8(__pyx_t_3); if (unlikely((__pyx_t_8 == ((Uint8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1496, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyInt_As_Uint8(__pyx_t_3); if (unlikely((__pyx_t_8 == ((Uint8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1515, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1496, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1515, __pyx_L1_error) (__pyx_v_vertices[__pyx_t_7]).color.a = __pyx_t_8; - /* "pygame/_sdl2/video.pyx":1490 + /* "pygame/_sdl2/video.pyx":1509 * * cdef SDL_Vertex vertices[6] * for i, pos in enumerate((p1, p2, p3, p3, p4, p1)): # <<<<<<<<<<<<<< @@ -20981,7 +21201,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_30fill_quad(struct __p __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sdl2/video.pyx":1498 + /* "pygame/_sdl2/video.pyx":1517 * vertices[i].color.a = self._draw_color[3] * * cdef int res = SDL_RenderGeometry(self._renderer, NULL, vertices, 6, NULL, 0) # <<<<<<<<<<<<<< @@ -20990,7 +21210,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_30fill_quad(struct __p */ __pyx_v_res = SDL_RenderGeometry(__pyx_v_self->_renderer, NULL, __pyx_v_vertices, 6, NULL, 0); - /* "pygame/_sdl2/video.pyx":1499 + /* "pygame/_sdl2/video.pyx":1518 * * cdef int res = SDL_RenderGeometry(self._renderer, NULL, vertices, 6, NULL, 0) * if res < 0: # <<<<<<<<<<<<<< @@ -21000,14 +21220,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_30fill_quad(struct __p __pyx_t_1 = ((__pyx_v_res < 0) != 0); if (unlikely(__pyx_t_1)) { - /* "pygame/_sdl2/video.pyx":1500 + /* "pygame/_sdl2/video.pyx":1519 * cdef int res = SDL_RenderGeometry(self._renderer, NULL, vertices, 6, NULL, 0) * if res < 0: * raise error() # <<<<<<<<<<<<<< * * def to_surface(self, surface=None, area=None): */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_error); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1500, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_error); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1519, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { @@ -21021,14 +21241,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_30fill_quad(struct __p } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1500, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1519, __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, 1500, __pyx_L1_error) + __PYX_ERR(0, 1519, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":1499 + /* "pygame/_sdl2/video.pyx":1518 * * cdef int res = SDL_RenderGeometry(self._renderer, NULL, vertices, 6, NULL, 0) * if res < 0: # <<<<<<<<<<<<<< @@ -21037,7 +21257,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_30fill_quad(struct __p */ } - /* "pygame/_sdl2/video.pyx":1484 + /* "pygame/_sdl2/video.pyx":1503 * raise error() * * def fill_quad(self, p1, p2, p3, p4): # <<<<<<<<<<<<<< @@ -21062,7 +21282,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_30fill_quad(struct __p return __pyx_r; } -/* "pygame/_sdl2/video.pyx":1502 +/* "pygame/_sdl2/video.pyx":1521 * raise error() * * def to_surface(self, surface=None, area=None): # <<<<<<<<<<<<<< @@ -21113,7 +21333,7 @@ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_8Renderer_33to_surface(PyObject } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "to_surface") < 0)) __PYX_ERR(0, 1502, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "to_surface") < 0)) __PYX_ERR(0, 1521, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -21130,7 +21350,7 @@ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_8Renderer_33to_surface(PyObject } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("to_surface", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1502, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("to_surface", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1521, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pygame._sdl2.video.Renderer.to_surface", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -21166,7 +21386,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_32to_surface(struct __ __Pyx_RefNannySetupContext("to_surface", 0); __Pyx_INCREF(__pyx_v_surface); - /* "pygame/_sdl2/video.pyx":1530 + /* "pygame/_sdl2/video.pyx":1549 * * # obtain area to use * if area is not None: # <<<<<<<<<<<<<< @@ -21177,7 +21397,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_32to_surface(struct __ __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "pygame/_sdl2/video.pyx":1532 + /* "pygame/_sdl2/video.pyx":1551 * if area is not None: * * rectptr = pgRect_FromObject(area, &rarea) # <<<<<<<<<<<<<< @@ -21186,7 +21406,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_32to_surface(struct __ */ __pyx_v_rectptr = pgRect_FromObject(__pyx_v_area, (&__pyx_v_rarea)); - /* "pygame/_sdl2/video.pyx":1533 + /* "pygame/_sdl2/video.pyx":1552 * * rectptr = pgRect_FromObject(area, &rarea) * if rectptr == NULL: # <<<<<<<<<<<<<< @@ -21196,20 +21416,20 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_32to_surface(struct __ __pyx_t_2 = ((__pyx_v_rectptr == NULL) != 0); if (unlikely(__pyx_t_2)) { - /* "pygame/_sdl2/video.pyx":1534 + /* "pygame/_sdl2/video.pyx":1553 * rectptr = pgRect_FromObject(area, &rarea) * if rectptr == NULL: * raise TypeError('area must be None or a rect') # <<<<<<<<<<<<<< * * # clip area */ - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__35, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1534, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__35, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1553, __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, 1534, __pyx_L1_error) + __PYX_ERR(0, 1553, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":1533 + /* "pygame/_sdl2/video.pyx":1552 * * rectptr = pgRect_FromObject(area, &rarea) * if rectptr == NULL: # <<<<<<<<<<<<<< @@ -21218,7 +21438,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_32to_surface(struct __ */ } - /* "pygame/_sdl2/video.pyx":1537 + /* "pygame/_sdl2/video.pyx":1556 * * # clip area * SDL_RenderGetViewport(self._renderer, &tempviewport) # <<<<<<<<<<<<<< @@ -21227,7 +21447,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_32to_surface(struct __ */ SDL_RenderGetViewport(__pyx_v_self->_renderer, (&__pyx_v_tempviewport)); - /* "pygame/_sdl2/video.pyx":1538 + /* "pygame/_sdl2/video.pyx":1557 * # clip area * SDL_RenderGetViewport(self._renderer, &tempviewport) * SDL_IntersectRect(rectptr, &tempviewport, rectptr) # <<<<<<<<<<<<<< @@ -21236,7 +21456,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_32to_surface(struct __ */ (void)(SDL_IntersectRect(__pyx_v_rectptr, (&__pyx_v_tempviewport), __pyx_v_rectptr)); - /* "pygame/_sdl2/video.pyx":1540 + /* "pygame/_sdl2/video.pyx":1559 * SDL_IntersectRect(rectptr, &tempviewport, rectptr) * * areaparam = rectptr # <<<<<<<<<<<<<< @@ -21245,7 +21465,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_32to_surface(struct __ */ __pyx_v_areaparam = __pyx_v_rectptr; - /* "pygame/_sdl2/video.pyx":1541 + /* "pygame/_sdl2/video.pyx":1560 * * areaparam = rectptr * rarea.x = rectptr.x # <<<<<<<<<<<<<< @@ -21255,7 +21475,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_32to_surface(struct __ __pyx_t_4 = __pyx_v_rectptr->x; __pyx_v_rarea.x = __pyx_t_4; - /* "pygame/_sdl2/video.pyx":1542 + /* "pygame/_sdl2/video.pyx":1561 * areaparam = rectptr * rarea.x = rectptr.x * rarea.y = rectptr.y # <<<<<<<<<<<<<< @@ -21265,7 +21485,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_32to_surface(struct __ __pyx_t_4 = __pyx_v_rectptr->y; __pyx_v_rarea.y = __pyx_t_4; - /* "pygame/_sdl2/video.pyx":1543 + /* "pygame/_sdl2/video.pyx":1562 * rarea.x = rectptr.x * rarea.y = rectptr.y * rarea.w = rectptr.w # <<<<<<<<<<<<<< @@ -21275,7 +21495,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_32to_surface(struct __ __pyx_t_4 = __pyx_v_rectptr->w; __pyx_v_rarea.w = __pyx_t_4; - /* "pygame/_sdl2/video.pyx":1544 + /* "pygame/_sdl2/video.pyx":1563 * rarea.y = rectptr.y * rarea.w = rectptr.w * rarea.h = rectptr.h # <<<<<<<<<<<<<< @@ -21285,7 +21505,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_32to_surface(struct __ __pyx_t_4 = __pyx_v_rectptr->h; __pyx_v_rarea.h = __pyx_t_4; - /* "pygame/_sdl2/video.pyx":1530 + /* "pygame/_sdl2/video.pyx":1549 * * # obtain area to use * if area is not None: # <<<<<<<<<<<<<< @@ -21295,7 +21515,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_32to_surface(struct __ goto __pyx_L3; } - /* "pygame/_sdl2/video.pyx":1546 + /* "pygame/_sdl2/video.pyx":1565 * rarea.h = rectptr.h * else: * SDL_RenderGetViewport(self._renderer, &rarea) # <<<<<<<<<<<<<< @@ -21305,7 +21525,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_32to_surface(struct __ /*else*/ { SDL_RenderGetViewport(__pyx_v_self->_renderer, (&__pyx_v_rarea)); - /* "pygame/_sdl2/video.pyx":1547 + /* "pygame/_sdl2/video.pyx":1566 * else: * SDL_RenderGetViewport(self._renderer, &rarea) * areaparam = NULL # <<<<<<<<<<<<<< @@ -21316,7 +21536,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_32to_surface(struct __ } __pyx_L3:; - /* "pygame/_sdl2/video.pyx":1550 + /* "pygame/_sdl2/video.pyx":1569 * * # prepare surface * if surface is None: # <<<<<<<<<<<<<< @@ -21327,7 +21547,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_32to_surface(struct __ __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "pygame/_sdl2/video.pyx":1552 + /* "pygame/_sdl2/video.pyx":1571 * if surface is None: * # create a new surface * format = SDL_GetWindowPixelFormat(self._win._win) # <<<<<<<<<<<<<< @@ -21336,7 +21556,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_32to_surface(struct __ */ __pyx_v_format = SDL_GetWindowPixelFormat(__pyx_v_self->_win->_win); - /* "pygame/_sdl2/video.pyx":1553 + /* "pygame/_sdl2/video.pyx":1572 * # create a new surface * format = SDL_GetWindowPixelFormat(self._win._win) * if format == SDL_PIXELFORMAT_UNKNOWN: # <<<<<<<<<<<<<< @@ -21346,14 +21566,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_32to_surface(struct __ __pyx_t_1 = ((__pyx_v_format == SDL_PIXELFORMAT_UNKNOWN) != 0); if (unlikely(__pyx_t_1)) { - /* "pygame/_sdl2/video.pyx":1554 + /* "pygame/_sdl2/video.pyx":1573 * format = SDL_GetWindowPixelFormat(self._win._win) * if format == SDL_PIXELFORMAT_UNKNOWN: * raise error() # <<<<<<<<<<<<<< * * surf = SDL_CreateRGBSurfaceWithFormat( */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_error); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1554, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_error); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1573, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { @@ -21367,14 +21587,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_32to_surface(struct __ } __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1554, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1573, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 1554, __pyx_L1_error) + __PYX_ERR(0, 1573, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":1553 + /* "pygame/_sdl2/video.pyx":1572 * # create a new surface * format = SDL_GetWindowPixelFormat(self._win._win) * if format == SDL_PIXELFORMAT_UNKNOWN: # <<<<<<<<<<<<<< @@ -21383,7 +21603,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_32to_surface(struct __ */ } - /* "pygame/_sdl2/video.pyx":1556 + /* "pygame/_sdl2/video.pyx":1575 * raise error() * * surf = SDL_CreateRGBSurfaceWithFormat( # <<<<<<<<<<<<<< @@ -21392,7 +21612,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_32to_surface(struct __ */ __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":1561 + /* "pygame/_sdl2/video.pyx":1580 * SDL_BITSPERPIXEL(format), * format) * if surf == NULL: # <<<<<<<<<<<<<< @@ -21402,20 +21622,20 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_32to_surface(struct __ __pyx_t_1 = ((__pyx_v_surf == NULL) != 0); if (unlikely(__pyx_t_1)) { - /* "pygame/_sdl2/video.pyx":1562 + /* "pygame/_sdl2/video.pyx":1581 * format) * if surf == NULL: * raise MemoryError("not enough memory for the surface") # <<<<<<<<<<<<<< * * surface = pgSurface_New2(surf, 1) */ - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__36, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1562, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__36, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1581, __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, 1562, __pyx_L1_error) + __PYX_ERR(0, 1581, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":1561 + /* "pygame/_sdl2/video.pyx":1580 * SDL_BITSPERPIXEL(format), * format) * if surf == NULL: # <<<<<<<<<<<<<< @@ -21424,7 +21644,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_32to_surface(struct __ */ } - /* "pygame/_sdl2/video.pyx":1564 + /* "pygame/_sdl2/video.pyx":1583 * raise MemoryError("not enough memory for the surface") * * surface = pgSurface_New2(surf, 1) # <<<<<<<<<<<<<< @@ -21437,7 +21657,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_32to_surface(struct __ __Pyx_DECREF_SET(__pyx_v_surface, __pyx_t_3); __pyx_t_3 = 0; - /* "pygame/_sdl2/video.pyx":1550 + /* "pygame/_sdl2/video.pyx":1569 * * # prepare surface * if surface is None: # <<<<<<<<<<<<<< @@ -21447,7 +21667,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_32to_surface(struct __ goto __pyx_L5; } - /* "pygame/_sdl2/video.pyx":1565 + /* "pygame/_sdl2/video.pyx":1584 * * surface = pgSurface_New2(surf, 1) * elif pgSurface_Check(surface): # <<<<<<<<<<<<<< @@ -21457,7 +21677,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_32to_surface(struct __ __pyx_t_1 = (pgSurface_Check(__pyx_v_surface) != 0); if (likely(__pyx_t_1)) { - /* "pygame/_sdl2/video.pyx":1566 + /* "pygame/_sdl2/video.pyx":1585 * surface = pgSurface_New2(surf, 1) * elif pgSurface_Check(surface): * surf = pgSurface_AsSurface(surface) # <<<<<<<<<<<<<< @@ -21466,7 +21686,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_32to_surface(struct __ */ __pyx_v_surf = pgSurface_AsSurface(__pyx_v_surface); - /* "pygame/_sdl2/video.pyx":1567 + /* "pygame/_sdl2/video.pyx":1586 * elif pgSurface_Check(surface): * surf = pgSurface_AsSurface(surface) * if surf.w < rarea.w or surf.h < rarea.h: # <<<<<<<<<<<<<< @@ -21484,20 +21704,20 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_32to_surface(struct __ __pyx_L9_bool_binop_done:; if (unlikely(__pyx_t_1)) { - /* "pygame/_sdl2/video.pyx":1568 + /* "pygame/_sdl2/video.pyx":1587 * 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_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__37, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1568, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__37, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1587, __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, 1568, __pyx_L1_error) + __PYX_ERR(0, 1587, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":1567 + /* "pygame/_sdl2/video.pyx":1586 * elif pgSurface_Check(surface): * surf = pgSurface_AsSurface(surface) * if surf.w < rarea.w or surf.h < rarea.h: # <<<<<<<<<<<<<< @@ -21506,7 +21726,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_32to_surface(struct __ */ } - /* "pygame/_sdl2/video.pyx":1569 + /* "pygame/_sdl2/video.pyx":1588 * if surf.w < rarea.w or surf.h < rarea.h: * raise ValueError("the surface is too small") * format = surf.format.format # <<<<<<<<<<<<<< @@ -21516,7 +21736,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_32to_surface(struct __ __pyx_t_8 = __pyx_v_surf->format->format; __pyx_v_format = __pyx_t_8; - /* "pygame/_sdl2/video.pyx":1565 + /* "pygame/_sdl2/video.pyx":1584 * * surface = pgSurface_New2(surf, 1) * elif pgSurface_Check(surface): # <<<<<<<<<<<<<< @@ -21526,7 +21746,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_32to_surface(struct __ goto __pyx_L5; } - /* "pygame/_sdl2/video.pyx":1571 + /* "pygame/_sdl2/video.pyx":1590 * format = surf.format.format * else: * raise TypeError("'surface' must be a surface or None") # <<<<<<<<<<<<<< @@ -21534,15 +21754,15 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_32to_surface(struct __ * if SDL_RenderReadPixels(self._renderer, */ /*else*/ { - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__38, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1571, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__38, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1590, __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, 1571, __pyx_L1_error) + __PYX_ERR(0, 1590, __pyx_L1_error) } __pyx_L5:; - /* "pygame/_sdl2/video.pyx":1575 + /* "pygame/_sdl2/video.pyx":1594 * if SDL_RenderReadPixels(self._renderer, * areaparam, * format, surf.pixels, surf.pitch) < 0: # <<<<<<<<<<<<<< @@ -21551,7 +21771,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_32to_surface(struct __ */ __pyx_t_1 = ((SDL_RenderReadPixels(__pyx_v_self->_renderer, __pyx_v_areaparam, __pyx_v_format, __pyx_v_surf->pixels, __pyx_v_surf->pitch) < 0) != 0); - /* "pygame/_sdl2/video.pyx":1573 + /* "pygame/_sdl2/video.pyx":1592 * raise TypeError("'surface' must be a surface or None") * * if SDL_RenderReadPixels(self._renderer, # <<<<<<<<<<<<<< @@ -21560,14 +21780,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_32to_surface(struct __ */ if (unlikely(__pyx_t_1)) { - /* "pygame/_sdl2/video.pyx":1576 + /* "pygame/_sdl2/video.pyx":1595 * areaparam, * format, surf.pixels, surf.pitch) < 0: * raise error() # <<<<<<<<<<<<<< * return surface * */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_error); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1576, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_error); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1595, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { @@ -21581,14 +21801,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_32to_surface(struct __ } __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1576, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1595, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 1576, __pyx_L1_error) + __PYX_ERR(0, 1595, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":1573 + /* "pygame/_sdl2/video.pyx":1592 * raise TypeError("'surface' must be a surface or None") * * if SDL_RenderReadPixels(self._renderer, # <<<<<<<<<<<<<< @@ -21597,7 +21817,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_32to_surface(struct __ */ } - /* "pygame/_sdl2/video.pyx":1577 + /* "pygame/_sdl2/video.pyx":1596 * format, surf.pixels, surf.pitch) < 0: * raise error() * return surface # <<<<<<<<<<<<<< @@ -21609,7 +21829,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_32to_surface(struct __ __pyx_r = __pyx_v_surface; goto __pyx_L0; - /* "pygame/_sdl2/video.pyx":1502 + /* "pygame/_sdl2/video.pyx":1521 * raise error() * * def to_surface(self, surface=None, area=None): # <<<<<<<<<<<<<< @@ -21631,7 +21851,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_32to_surface(struct __ return __pyx_r; } -/* "pygame/_sdl2/video.pyx":1580 +/* "pygame/_sdl2/video.pyx":1599 * * @staticmethod * def compose_custom_blend_mode(color_mode, alpha_mode): # <<<<<<<<<<<<<< @@ -21675,11 +21895,11 @@ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_8Renderer_35compose_custom_blend case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_alpha_mode)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("compose_custom_blend_mode", 1, 2, 2, 1); __PYX_ERR(0, 1580, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("compose_custom_blend_mode", 1, 2, 2, 1); __PYX_ERR(0, 1599, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "compose_custom_blend_mode") < 0)) __PYX_ERR(0, 1580, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "compose_custom_blend_mode") < 0)) __PYX_ERR(0, 1599, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -21692,7 +21912,7 @@ static PyObject *__pyx_pw_6pygame_5_sdl2_5video_8Renderer_35compose_custom_blend } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("compose_custom_blend_mode", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1580, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("compose_custom_blend_mode", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1599, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pygame._sdl2.video.Renderer.compose_custom_blend_mode", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -21724,79 +21944,79 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_34compose_custom_blend int __pyx_clineno = 0; __Pyx_RefNannySetupContext("compose_custom_blend_mode", 0); - /* "pygame/_sdl2/video.pyx":1592 + /* "pygame/_sdl2/video.pyx":1611 * """ * # https://wiki.libsdl.org/SDL_ComposeCustomBlendMode * cdef int 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, 1592, __pyx_L1_error) + __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, 1611, __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, 1592, __pyx_L1_error) + __pyx_t_2 = ((SDL_BlendFactor)__Pyx_PyInt_As_SDL_BlendFactor(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1611, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sdl2/video.pyx":1593 + /* "pygame/_sdl2/video.pyx":1612 * # https://wiki.libsdl.org/SDL_ComposeCustomBlendMode * cdef int 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, 1593, __pyx_L1_error) + __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, 1612, __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, 1593, __pyx_L1_error) + __pyx_t_3 = ((SDL_BlendFactor)__Pyx_PyInt_As_SDL_BlendFactor(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1612, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sdl2/video.pyx":1594 + /* "pygame/_sdl2/video.pyx":1613 * cdef int 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, 1594, __pyx_L1_error) + __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, 1613, __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, 1594, __pyx_L1_error) + __pyx_t_4 = ((SDL_BlendOperation)__Pyx_PyInt_As_SDL_BlendOperation(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1613, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sdl2/video.pyx":1595 + /* "pygame/_sdl2/video.pyx":1614 * 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, 1595, __pyx_L1_error) + __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, 1614, __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, 1595, __pyx_L1_error) + __pyx_t_5 = ((SDL_BlendFactor)__Pyx_PyInt_As_SDL_BlendFactor(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1614, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sdl2/video.pyx":1596 + /* "pygame/_sdl2/video.pyx":1615 * 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, 1596, __pyx_L1_error) + __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, 1615, __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, 1596, __pyx_L1_error) + __pyx_t_6 = ((SDL_BlendFactor)__Pyx_PyInt_As_SDL_BlendFactor(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1615, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sdl2/video.pyx":1597 + /* "pygame/_sdl2/video.pyx":1616 * 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, 1597, __pyx_L1_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, 1616, __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, 1597, __pyx_L1_error) + __pyx_t_7 = ((SDL_BlendOperation)__Pyx_PyInt_As_SDL_BlendOperation(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1616, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sdl2/video.pyx":1592 + /* "pygame/_sdl2/video.pyx":1611 * """ * # https://wiki.libsdl.org/SDL_ComposeCustomBlendMode * cdef int res = SDL_ComposeCustomBlendMode(color_mode[0], # <<<<<<<<<<<<<< @@ -21805,7 +22025,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_34compose_custom_blend */ __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":1598 + /* "pygame/_sdl2/video.pyx":1617 * alpha_mode[1], * alpha_mode[2]) * if res < 0: # <<<<<<<<<<<<<< @@ -21815,13 +22035,13 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_34compose_custom_blend __pyx_t_8 = ((__pyx_v_res < 0) != 0); if (unlikely(__pyx_t_8)) { - /* "pygame/_sdl2/video.pyx":1599 + /* "pygame/_sdl2/video.pyx":1618 * 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, 1599, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_error); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1618, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) { @@ -21835,14 +22055,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_34compose_custom_blend } __pyx_t_1 = (__pyx_t_10) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10) : __Pyx_PyObject_CallNoArg(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1599, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1618, __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, 1599, __pyx_L1_error) + __PYX_ERR(0, 1618, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":1598 + /* "pygame/_sdl2/video.pyx":1617 * alpha_mode[1], * alpha_mode[2]) * if res < 0: # <<<<<<<<<<<<<< @@ -21851,19 +22071,19 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_34compose_custom_blend */ } - /* "pygame/_sdl2/video.pyx":1600 + /* "pygame/_sdl2/video.pyx":1619 * if res < 0: * raise error() * return res # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_res); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1600, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_res); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1619, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "pygame/_sdl2/video.pyx":1580 + /* "pygame/_sdl2/video.pyx":1599 * * @staticmethod * def compose_custom_blend_mode(color_mode, alpha_mode): # <<<<<<<<<<<<<< @@ -21997,7 +22217,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_5video_8Renderer_38__setstate_cython__( return __pyx_r; } -static PyObject *__pyx_tp_new_6pygame_5_sdl2_5video_Window(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { +static PyObject *__pyx_tp_new_6pygame_5_sdl2_5video__Window(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); @@ -22008,7 +22228,7 @@ static PyObject *__pyx_tp_new_6pygame_5_sdl2_5video_Window(PyTypeObject *t, CYTH return o; } -static void __pyx_tp_dealloc_6pygame_5_sdl2_5video_Window(PyObject *o) { +static void __pyx_tp_dealloc_6pygame_5_sdl2_5video__Window(PyObject *o) { #if CYTHON_USE_TP_FINALIZE if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { if (PyObject_CallFinalizerFromDealloc(o)) return; @@ -22018,20 +22238,20 @@ static void __pyx_tp_dealloc_6pygame_5_sdl2_5video_Window(PyObject *o) { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1); - __pyx_pw_6pygame_5_sdl2_5video_6Window_27__dealloc__(o); + __pyx_pw_6pygame_5_sdl2_5video_7_Window_27__dealloc__(o); __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1); PyErr_Restore(etype, eval, etb); } (*Py_TYPE(o)->tp_free)(o); } -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 PyObject *__pyx_getprop_6pygame_5_sdl2_5video_7_Window_grab(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6pygame_5_sdl2_5video_7_Window_4grab_1__get__(o); } -static int __pyx_setprop_6pygame_5_sdl2_5video_6Window_grab(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { +static int __pyx_setprop_6pygame_5_sdl2_5video_7_Window_grab(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { - return __pyx_pw_6pygame_5_sdl2_5video_6Window_4grab_3__set__(o, v); + return __pyx_pw_6pygame_5_sdl2_5video_7_Window_4grab_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); @@ -22039,13 +22259,13 @@ static int __pyx_setprop_6pygame_5_sdl2_5video_6Window_grab(PyObject *o, PyObjec } } -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 PyObject *__pyx_getprop_6pygame_5_sdl2_5video_7_Window_relative_mouse(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6pygame_5_sdl2_5video_7_Window_14relative_mouse_1__get__(o); } -static int __pyx_setprop_6pygame_5_sdl2_5video_6Window_relative_mouse(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { +static int __pyx_setprop_6pygame_5_sdl2_5video_7_Window_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); + return __pyx_pw_6pygame_5_sdl2_5video_7_Window_14relative_mouse_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); @@ -22053,13 +22273,13 @@ static int __pyx_setprop_6pygame_5_sdl2_5video_6Window_relative_mouse(PyObject * } } -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 PyObject *__pyx_getprop_6pygame_5_sdl2_5video_7_Window_title(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6pygame_5_sdl2_5video_7_Window_5title_1__get__(o); } -static int __pyx_setprop_6pygame_5_sdl2_5video_6Window_title(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { +static int __pyx_setprop_6pygame_5_sdl2_5video_7_Window_title(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { - return __pyx_pw_6pygame_5_sdl2_5video_6Window_5title_3__set__(o, v); + return __pyx_pw_6pygame_5_sdl2_5video_7_Window_5title_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); @@ -22067,13 +22287,13 @@ static int __pyx_setprop_6pygame_5_sdl2_5video_6Window_title(PyObject *o, PyObje } } -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 PyObject *__pyx_getprop_6pygame_5_sdl2_5video_7_Window_resizable(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6pygame_5_sdl2_5video_7_Window_9resizable_1__get__(o); } -static int __pyx_setprop_6pygame_5_sdl2_5video_6Window_resizable(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { +static int __pyx_setprop_6pygame_5_sdl2_5video_7_Window_resizable(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { - return __pyx_pw_6pygame_5_sdl2_5video_6Window_9resizable_3__set__(o, v); + return __pyx_pw_6pygame_5_sdl2_5video_7_Window_9resizable_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); @@ -22081,13 +22301,13 @@ static int __pyx_setprop_6pygame_5_sdl2_5video_6Window_resizable(PyObject *o, Py } } -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 PyObject *__pyx_getprop_6pygame_5_sdl2_5video_7_Window_borderless(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6pygame_5_sdl2_5video_7_Window_10borderless_1__get__(o); } -static int __pyx_setprop_6pygame_5_sdl2_5video_6Window_borderless(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { +static int __pyx_setprop_6pygame_5_sdl2_5video_7_Window_borderless(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { - return __pyx_pw_6pygame_5_sdl2_5video_6Window_10borderless_3__set__(o, v); + return __pyx_pw_6pygame_5_sdl2_5video_7_Window_10borderless_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); @@ -22095,17 +22315,17 @@ static int __pyx_setprop_6pygame_5_sdl2_5video_6Window_borderless(PyObject *o, P } } -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_7_Window_id(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6pygame_5_sdl2_5video_7_Window_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 PyObject *__pyx_getprop_6pygame_5_sdl2_5video_7_Window_size(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6pygame_5_sdl2_5video_7_Window_4size_1__get__(o); } -static int __pyx_setprop_6pygame_5_sdl2_5video_6Window_size(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { +static int __pyx_setprop_6pygame_5_sdl2_5video_7_Window_size(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { - return __pyx_pw_6pygame_5_sdl2_5video_6Window_4size_3__set__(o, v); + return __pyx_pw_6pygame_5_sdl2_5video_7_Window_4size_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); @@ -22113,13 +22333,13 @@ static int __pyx_setprop_6pygame_5_sdl2_5video_6Window_size(PyObject *o, PyObjec } } -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 PyObject *__pyx_getprop_6pygame_5_sdl2_5video_7_Window_position(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6pygame_5_sdl2_5video_7_Window_8position_1__get__(o); } -static int __pyx_setprop_6pygame_5_sdl2_5video_6Window_position(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { +static int __pyx_setprop_6pygame_5_sdl2_5video_7_Window_position(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { - return __pyx_pw_6pygame_5_sdl2_5video_6Window_8position_3__set__(o, v); + return __pyx_pw_6pygame_5_sdl2_5video_7_Window_8position_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); @@ -22127,13 +22347,13 @@ static int __pyx_setprop_6pygame_5_sdl2_5video_6Window_position(PyObject *o, PyO } } -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 PyObject *__pyx_getprop_6pygame_5_sdl2_5video_7_Window_opacity(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6pygame_5_sdl2_5video_7_Window_7opacity_1__get__(o); } -static int __pyx_setprop_6pygame_5_sdl2_5video_6Window_opacity(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { +static int __pyx_setprop_6pygame_5_sdl2_5video_7_Window_opacity(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { - return __pyx_pw_6pygame_5_sdl2_5video_6Window_7opacity_3__set__(o, v); + return __pyx_pw_6pygame_5_sdl2_5video_7_Window_7opacity_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); @@ -22141,48 +22361,48 @@ static int __pyx_setprop_6pygame_5_sdl2_5video_6Window_opacity(PyObject *o, PyOb } } -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 PyObject *__pyx_getprop_6pygame_5_sdl2_5video_7_Window_display_index(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6pygame_5_sdl2_5video_7_Window_13display_index_1__get__(o); } -static PyMethodDef __pyx_methods_6pygame_5_sdl2_5video_Window[] = { - {"from_display_module", (PyCFunction)__pyx_pw_6pygame_5_sdl2_5video_6Window_1from_display_module, METH_NOARGS, __pyx_doc_6pygame_5_sdl2_5video_6Window_from_display_module}, - {"set_windowed", (PyCFunction)__pyx_pw_6pygame_5_sdl2_5video_6Window_5set_windowed, METH_NOARGS, __pyx_doc_6pygame_5_sdl2_5video_6Window_4set_windowed}, - {"set_fullscreen", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_6Window_7set_fullscreen, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6pygame_5_sdl2_5video_6Window_6set_fullscreen}, - {"destroy", (PyCFunction)__pyx_pw_6pygame_5_sdl2_5video_6Window_9destroy, METH_NOARGS, __pyx_doc_6pygame_5_sdl2_5video_6Window_8destroy}, - {"hide", (PyCFunction)__pyx_pw_6pygame_5_sdl2_5video_6Window_11hide, METH_NOARGS, __pyx_doc_6pygame_5_sdl2_5video_6Window_10hide}, - {"show", (PyCFunction)__pyx_pw_6pygame_5_sdl2_5video_6Window_13show, METH_NOARGS, __pyx_doc_6pygame_5_sdl2_5video_6Window_12show}, - {"focus", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_6Window_15focus, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6pygame_5_sdl2_5video_6Window_14focus}, - {"restore", (PyCFunction)__pyx_pw_6pygame_5_sdl2_5video_6Window_17restore, METH_NOARGS, __pyx_doc_6pygame_5_sdl2_5video_6Window_16restore}, - {"maximize", (PyCFunction)__pyx_pw_6pygame_5_sdl2_5video_6Window_19maximize, METH_NOARGS, __pyx_doc_6pygame_5_sdl2_5video_6Window_18maximize}, - {"minimize", (PyCFunction)__pyx_pw_6pygame_5_sdl2_5video_6Window_21minimize, METH_NOARGS, __pyx_doc_6pygame_5_sdl2_5video_6Window_20minimize}, - {"set_icon", (PyCFunction)__pyx_pw_6pygame_5_sdl2_5video_6Window_23set_icon, METH_O, __pyx_doc_6pygame_5_sdl2_5video_6Window_22set_icon}, - {"set_modal_for", (PyCFunction)__pyx_pw_6pygame_5_sdl2_5video_6Window_25set_modal_for, METH_O, __pyx_doc_6pygame_5_sdl2_5video_6Window_24set_modal_for}, - {"__reduce_cython__", (PyCFunction)__pyx_pw_6pygame_5_sdl2_5video_6Window_29__reduce_cython__, METH_NOARGS, 0}, - {"__setstate_cython__", (PyCFunction)__pyx_pw_6pygame_5_sdl2_5video_6Window_31__setstate_cython__, METH_O, 0}, +static PyMethodDef __pyx_methods_6pygame_5_sdl2_5video__Window[] = { + {"from_display_module", (PyCFunction)__pyx_pw_6pygame_5_sdl2_5video_7_Window_1from_display_module, METH_NOARGS, __pyx_doc_6pygame_5_sdl2_5video_7_Window_from_display_module}, + {"set_windowed", (PyCFunction)__pyx_pw_6pygame_5_sdl2_5video_7_Window_5set_windowed, METH_NOARGS, __pyx_doc_6pygame_5_sdl2_5video_7_Window_4set_windowed}, + {"set_fullscreen", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_7_Window_7set_fullscreen, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6pygame_5_sdl2_5video_7_Window_6set_fullscreen}, + {"destroy", (PyCFunction)__pyx_pw_6pygame_5_sdl2_5video_7_Window_9destroy, METH_NOARGS, __pyx_doc_6pygame_5_sdl2_5video_7_Window_8destroy}, + {"hide", (PyCFunction)__pyx_pw_6pygame_5_sdl2_5video_7_Window_11hide, METH_NOARGS, __pyx_doc_6pygame_5_sdl2_5video_7_Window_10hide}, + {"show", (PyCFunction)__pyx_pw_6pygame_5_sdl2_5video_7_Window_13show, METH_NOARGS, __pyx_doc_6pygame_5_sdl2_5video_7_Window_12show}, + {"focus", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6pygame_5_sdl2_5video_7_Window_15focus, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6pygame_5_sdl2_5video_7_Window_14focus}, + {"restore", (PyCFunction)__pyx_pw_6pygame_5_sdl2_5video_7_Window_17restore, METH_NOARGS, __pyx_doc_6pygame_5_sdl2_5video_7_Window_16restore}, + {"maximize", (PyCFunction)__pyx_pw_6pygame_5_sdl2_5video_7_Window_19maximize, METH_NOARGS, __pyx_doc_6pygame_5_sdl2_5video_7_Window_18maximize}, + {"minimize", (PyCFunction)__pyx_pw_6pygame_5_sdl2_5video_7_Window_21minimize, METH_NOARGS, __pyx_doc_6pygame_5_sdl2_5video_7_Window_20minimize}, + {"set_icon", (PyCFunction)__pyx_pw_6pygame_5_sdl2_5video_7_Window_23set_icon, METH_O, __pyx_doc_6pygame_5_sdl2_5video_7_Window_22set_icon}, + {"set_modal_for", (PyCFunction)__pyx_pw_6pygame_5_sdl2_5video_7_Window_25set_modal_for, METH_O, __pyx_doc_6pygame_5_sdl2_5video_7_Window_24set_modal_for}, + {"__reduce_cython__", (PyCFunction)__pyx_pw_6pygame_5_sdl2_5video_7_Window_29__reduce_cython__, METH_NOARGS, 0}, + {"__setstate_cython__", (PyCFunction)__pyx_pw_6pygame_5_sdl2_5video_7_Window_31__setstate_cython__, METH_O, 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 *)"Get or set the window's input grab state\n\n Gets or sets the window's input grab state.\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 ", 0}, - {(char *)"relative_mouse", __pyx_getprop_6pygame_5_sdl2_5video_6Window_relative_mouse, __pyx_setprop_6pygame_5_sdl2_5video_6Window_relative_mouse, (char *)"Get or set the window's relative mouse mode state\n\n Gets or sets the window's relative mouse mode state.\n SDL2 docs: *\"While the mouse is in relative mode, the cursor is hidden,\n the mouse position is constrained to the window, and SDL will report\n continuous relative mouse motion even if the mouse is at the edge of the\n window.*\n\n *This function will flush any pending mouse motion.\"*\n\n Calling :func:`pygame.mouse.set_visible` with argument\n ``True`` will exit relative mouse mode.\n ", 0}, - {(char *)"title", __pyx_getprop_6pygame_5_sdl2_5video_6Window_title, __pyx_setprop_6pygame_5_sdl2_5video_6Window_title, (char *)"Get or set the window title\n\n Gets or sets the window title. An empty string means that no title is set.An empty string means that no title is set.\n ", 0}, - {(char *)"resizable", __pyx_getprop_6pygame_5_sdl2_5video_6Window_resizable, __pyx_setprop_6pygame_5_sdl2_5video_6Window_resizable, (char *)"Get or set 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 *)"Get or set whether the window is borderless\n\n Gets or sets whether the window is borderless.\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 *)"Get the unique window ID (**read-only**)\n ", 0}, - {(char *)"size", __pyx_getprop_6pygame_5_sdl2_5video_6Window_size, __pyx_setprop_6pygame_5_sdl2_5video_6Window_size, (char *)"Get or set the window size in pixels", 0}, - {(char *)"position", __pyx_getprop_6pygame_5_sdl2_5video_6Window_position, __pyx_setprop_6pygame_5_sdl2_5video_6Window_position, (char *)"Get or set the window position in screen coordinates\n ", 0}, - {(char *)"opacity", __pyx_getprop_6pygame_5_sdl2_5video_6Window_opacity, __pyx_setprop_6pygame_5_sdl2_5video_6Window_opacity, (char *)"Get or set the window opacity, a value between 0.0 (fully transparent) and 1.0 (fully opaque)\n ", 0}, - {(char *)"display_index", __pyx_getprop_6pygame_5_sdl2_5video_6Window_display_index, 0, (char *)"Get the index of the display that owns the window\n ", 0}, +static struct PyGetSetDef __pyx_getsets_6pygame_5_sdl2_5video__Window[] = { + {(char *)"grab", __pyx_getprop_6pygame_5_sdl2_5video_7_Window_grab, __pyx_setprop_6pygame_5_sdl2_5video_7_Window_grab, (char *)"Get or set the window's input grab state\n\n Gets or sets the window's input grab state.\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 ", 0}, + {(char *)"relative_mouse", __pyx_getprop_6pygame_5_sdl2_5video_7_Window_relative_mouse, __pyx_setprop_6pygame_5_sdl2_5video_7_Window_relative_mouse, (char *)"Get or set the window's relative mouse mode state\n\n Gets or sets the window's relative mouse mode state.\n SDL2 docs: *\"While the mouse is in relative mode, the cursor is hidden,\n the mouse position is constrained to the window, and SDL will report\n continuous relative mouse motion even if the mouse is at the edge of the\n window.*\n\n *This function will flush any pending mouse motion.\"*\n\n Calling :func:`pygame.mouse.set_visible` with argument\n ``True`` will exit relative mouse mode.\n ", 0}, + {(char *)"title", __pyx_getprop_6pygame_5_sdl2_5video_7_Window_title, __pyx_setprop_6pygame_5_sdl2_5video_7_Window_title, (char *)"Get or set the window title\n\n Gets or sets the window title. An empty string means that no title is set.An empty string means that no title is set.\n ", 0}, + {(char *)"resizable", __pyx_getprop_6pygame_5_sdl2_5video_7_Window_resizable, __pyx_setprop_6pygame_5_sdl2_5video_7_Window_resizable, (char *)"Get or set whether the window is resizable\n ", 0}, + {(char *)"borderless", __pyx_getprop_6pygame_5_sdl2_5video_7_Window_borderless, __pyx_setprop_6pygame_5_sdl2_5video_7_Window_borderless, (char *)"Get or set whether the window is borderless\n\n Gets or sets whether the window is borderless.\n\n .. note:: You can't change the border state of a fullscreen window.\n ", 0}, + {(char *)"id", __pyx_getprop_6pygame_5_sdl2_5video_7_Window_id, 0, (char *)"Get the unique window ID (**read-only**)\n ", 0}, + {(char *)"size", __pyx_getprop_6pygame_5_sdl2_5video_7_Window_size, __pyx_setprop_6pygame_5_sdl2_5video_7_Window_size, (char *)"Get or set the window size in pixels", 0}, + {(char *)"position", __pyx_getprop_6pygame_5_sdl2_5video_7_Window_position, __pyx_setprop_6pygame_5_sdl2_5video_7_Window_position, (char *)"Get or set the window position in screen coordinates\n ", 0}, + {(char *)"opacity", __pyx_getprop_6pygame_5_sdl2_5video_7_Window_opacity, __pyx_setprop_6pygame_5_sdl2_5video_7_Window_opacity, (char *)"Get or set the window opacity, a value between 0.0 (fully transparent) and 1.0 (fully opaque)\n ", 0}, + {(char *)"display_index", __pyx_getprop_6pygame_5_sdl2_5video_7_Window_display_index, 0, (char *)"Get the index of the display that owns the window\n ", 0}, {0, 0, 0, 0, 0} }; -static PyTypeObject __pyx_type_6pygame_5_sdl2_5video_Window = { +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*/ + "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*/ + __pyx_tp_dealloc_6pygame_5_sdl2_5video__Window, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif @@ -22215,17 +22435,17 @@ static PyTypeObject __pyx_type_6pygame_5_sdl2_5video_Window = { 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_6pygame_5_sdl2_5video_Window, /*tp_methods*/ + __pyx_methods_6pygame_5_sdl2_5video__Window, /*tp_methods*/ 0, /*tp_members*/ - __pyx_getsets_6pygame_5_sdl2_5video_Window, /*tp_getset*/ + __pyx_getsets_6pygame_5_sdl2_5video__Window, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ - __pyx_pw_6pygame_5_sdl2_5video_6Window_3__init__, /*tp_init*/ + __pyx_pw_6pygame_5_sdl2_5video_7_Window_3__init__, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_6pygame_5_sdl2_5video_Window, /*tp_new*/ + __pyx_tp_new_6pygame_5_sdl2_5video__Window, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -22263,7 +22483,7 @@ static PyObject *__pyx_tp_new_6pygame_5_sdl2_5video_Renderer(PyTypeObject *t, CY 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); + p->_win = ((pgWindowObject *)Py_None); Py_INCREF(Py_None); return o; } @@ -22314,7 +22534,7 @@ static int __pyx_tp_clear_6pygame_5_sdl2_5video_Renderer(PyObject *o) { 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); + p->_win = ((pgWindowObject *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } @@ -23145,6 +23365,7 @@ static struct PyModuleDef __pyx_moduledef = { static __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_kp_s_Argument_window_has_incorrect_ty, __pyx_k_Argument_window_has_incorrect_ty, sizeof(__pyx_k_Argument_window_has_incorrect_ty), 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_KeyError, __pyx_k_KeyError, sizeof(__pyx_k_KeyError), 0, 0, 1, 1}, @@ -23165,6 +23386,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__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_2, __pyx_k_Window_2, sizeof(__pyx_k_Window_2), 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}, @@ -23360,13 +23582,13 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {0, 0, 0, 0, 0, 0, 0} }; static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { - __pyx_builtin_staticmethod = __Pyx_GetBuiltinName(__pyx_n_s_staticmethod); if (!__pyx_builtin_staticmethod) __PYX_ERR(0, 642, __pyx_L1_error) - __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(0, 127, __pyx_L1_error) - __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 128, __pyx_L1_error) - __pyx_builtin_reversed = __Pyx_GetBuiltinName(__pyx_n_s_reversed); if (!__pyx_builtin_reversed) __PYX_ERR(0, 128, __pyx_L1_error) - __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 242, __pyx_L1_error) - __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) __PYX_ERR(0, 254, __pyx_L1_error) - __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 255, __pyx_L1_error) + __pyx_builtin_staticmethod = __Pyx_GetBuiltinName(__pyx_n_s_staticmethod); if (!__pyx_builtin_staticmethod) __PYX_ERR(0, 644, __pyx_L1_error) + __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(0, 128, __pyx_L1_error) + __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 129, __pyx_L1_error) + __pyx_builtin_reversed = __Pyx_GetBuiltinName(__pyx_n_s_reversed); if (!__pyx_builtin_reversed) __PYX_ERR(0, 129, __pyx_L1_error) + __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 244, __pyx_L1_error) + __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) __PYX_ERR(0, 256, __pyx_L1_error) + __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 257, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; @@ -23376,36 +23598,36 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); - /* "pygame/_sdl2/video.pyx":71 + /* "pygame/_sdl2/video.pyx":72 * 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, 71, __pyx_L1_error) + __pyx_tuple__2 = PyTuple_Pack(1, __pyx_n_s_OK); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 72, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__2); __Pyx_GIVEREF(__pyx_tuple__2); - /* "pygame/_sdl2/video.pyx":242 + /* "pygame/_sdl2/video.pyx":244 * 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, 242, __pyx_L1_error) + __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_s_fullscreen_and_fullscreen_deskto); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 244, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__5); __Pyx_GIVEREF(__pyx_tuple__5); - /* "pygame/_sdl2/video.pyx":443 + /* "pygame/_sdl2/video.pyx":445 * """ * if not pgSurface_Check(surface): * raise TypeError('surface must be a Surface object') # <<<<<<<<<<<<<< * SDL_SetWindowIcon(self._win, pgSurface_AsSurface(surface)) * */ - __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_s_surface_must_be_a_Surface_object); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 443, __pyx_L1_error) + __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_s_surface_must_be_a_Surface_object); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 445, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__6); __Pyx_GIVEREF(__pyx_tuple__6); @@ -23428,141 +23650,141 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__8); __Pyx_GIVEREF(__pyx_tuple__8); - /* "pygame/_sdl2/video.pyx":533 + /* "pygame/_sdl2/video.pyx":535 * 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__9 = PyTuple_Pack(1, __pyx_kp_s_no_standard_masks_exist_for_give); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 533, __pyx_L1_error) + __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_no_standard_masks_exist_for_give); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 535, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__9); __Pyx_GIVEREF(__pyx_tuple__9); - /* "pygame/_sdl2/video.pyx":599 + /* "pygame/_sdl2/video.pyx":601 * 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__10 = PyTuple_Pack(1, __pyx_kp_s_size_must_have_two_elements); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 599, __pyx_L1_error) + __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_s_size_must_have_two_elements); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 601, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__10); __Pyx_GIVEREF(__pyx_tuple__10); - /* "pygame/_sdl2/video.pyx":602 + /* "pygame/_sdl2/video.pyx":604 * 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__11 = PyTuple_Pack(1, __pyx_kp_s_size_must_contain_two_positive_v); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 602, __pyx_L1_error) + __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_s_size_must_contain_two_positive_v); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 604, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__11); __Pyx_GIVEREF(__pyx_tuple__11); - /* "pygame/_sdl2/video.pyx":607 + /* "pygame/_sdl2/video.pyx":609 * 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__12 = PyTuple_Pack(1, __pyx_kp_s_only_one_of_static_streaming_or); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 607, __pyx_L1_error) + __pyx_tuple__12 = PyTuple_Pack(1, __pyx_kp_s_only_one_of_static_streaming_or); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 609, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__12); __Pyx_GIVEREF(__pyx_tuple__12); - /* "pygame/_sdl2/video.pyx":651 + /* "pygame/_sdl2/video.pyx":653 * # 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__13 = PyTuple_Pack(1, __pyx_kp_s_2nd_argument_must_be_a_surface); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 651, __pyx_L1_error) + __pyx_tuple__13 = PyTuple_Pack(1, __pyx_kp_s_2nd_argument_must_be_a_surface); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 653, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__13); __Pyx_GIVEREF(__pyx_tuple__13); - /* "pygame/_sdl2/video.pyx":786 + /* "pygame/_sdl2/video.pyx":788 * 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__14 = PyTuple_Pack(1, __pyx_kp_s_the_argument_is_not_a_rectangle); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(0, 786, __pyx_L1_error) + __pyx_tuple__14 = PyTuple_Pack(1, __pyx_kp_s_the_argument_is_not_a_rectangle); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(0, 788, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__14); __Pyx_GIVEREF(__pyx_tuple__14); - /* "pygame/_sdl2/video.pyx":798 + /* "pygame/_sdl2/video.pyx":800 * cdstrect = &dst * else: * raise TypeError('dstrect must be a position, rect, or None') # <<<<<<<<<<<<<< * * if origin: */ - __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_s_dstrect_must_be_a_position_rect); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 798, __pyx_L1_error) + __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_s_dstrect_must_be_a_position_rect); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 800, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__15); __Pyx_GIVEREF(__pyx_tuple__15); - /* "pygame/_sdl2/video.pyx":811 + /* "pygame/_sdl2/video.pyx":813 * * def draw_triangle(self, p1_xy, p2_xy, p3_xy, * p1_uv=(0.0, 0.0), p2_uv=(1.0, 1.0), p3_uv=(0.0, 1.0), # <<<<<<<<<<<<<< * p1_mod=(255, 255, 255, 255), p2_mod=(255, 255, 255, 255), p3_mod=(255, 255, 255, 255)): * """Copy a triangle portion of the texture to the rendering target using the given coordinates */ - __pyx_tuple__16 = PyTuple_Pack(2, __pyx_float_0_0, __pyx_float_0_0); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 811, __pyx_L1_error) + __pyx_tuple__16 = PyTuple_Pack(2, __pyx_float_0_0, __pyx_float_0_0); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 813, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__16); __Pyx_GIVEREF(__pyx_tuple__16); - __pyx_tuple__17 = PyTuple_Pack(2, __pyx_float_1_0, __pyx_float_1_0); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 811, __pyx_L1_error) + __pyx_tuple__17 = PyTuple_Pack(2, __pyx_float_1_0, __pyx_float_1_0); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 813, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__17); __Pyx_GIVEREF(__pyx_tuple__17); - __pyx_tuple__18 = PyTuple_Pack(2, __pyx_float_0_0, __pyx_float_1_0); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 811, __pyx_L1_error) + __pyx_tuple__18 = PyTuple_Pack(2, __pyx_float_0_0, __pyx_float_1_0); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 813, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__18); __Pyx_GIVEREF(__pyx_tuple__18); - /* "pygame/_sdl2/video.pyx":812 + /* "pygame/_sdl2/video.pyx":814 * def draw_triangle(self, p1_xy, p2_xy, p3_xy, * p1_uv=(0.0, 0.0), p2_uv=(1.0, 1.0), p3_uv=(0.0, 1.0), * p1_mod=(255, 255, 255, 255), p2_mod=(255, 255, 255, 255), p3_mod=(255, 255, 255, 255)): # <<<<<<<<<<<<<< * """Copy a triangle portion of the texture to the rendering target using the given coordinates * */ - __pyx_tuple__19 = PyTuple_Pack(4, __pyx_int_255, __pyx_int_255, __pyx_int_255, __pyx_int_255); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 812, __pyx_L1_error) + __pyx_tuple__19 = PyTuple_Pack(4, __pyx_int_255, __pyx_int_255, __pyx_int_255, __pyx_int_255); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 814, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__19); __Pyx_GIVEREF(__pyx_tuple__19); - /* "pygame/_sdl2/video.pyx":856 + /* "pygame/_sdl2/video.pyx":858 * * def draw_quad(self, p1_xy, p2_xy, p3_xy, p4_xy, * p1_uv=(0.0, 0.0), p2_uv=(1.0, 0.0), p3_uv=(1.0, 1.0), p4_uv=(0.0, 1.0), # <<<<<<<<<<<<<< * p1_mod=(255, 255, 255, 255), p2_mod=(255, 255, 255, 255), * p3_mod=(255, 255, 255, 255), p4_mod=(255, 255, 255, 255)): */ - __pyx_tuple__20 = PyTuple_Pack(2, __pyx_float_1_0, __pyx_float_0_0); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 856, __pyx_L1_error) + __pyx_tuple__20 = PyTuple_Pack(2, __pyx_float_1_0, __pyx_float_0_0); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 858, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__20); __Pyx_GIVEREF(__pyx_tuple__20); - /* "pygame/_sdl2/video.pyx":927 + /* "pygame/_sdl2/video.pyx":929 * * if not pgSurface_Check(surface): * raise TypeError("update source should be a Surface.") # <<<<<<<<<<<<<< * * cdef SDL_Rect rect */ - __pyx_tuple__21 = PyTuple_Pack(1, __pyx_kp_s_update_source_should_be_a_Surfac); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 927, __pyx_L1_error) + __pyx_tuple__21 = PyTuple_Pack(1, __pyx_kp_s_update_source_should_be_a_Surfac); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 929, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__21); __Pyx_GIVEREF(__pyx_tuple__21); - /* "pygame/_sdl2/video.pyx":939 + /* "pygame/_sdl2/video.pyx":941 * * if rectptr == NULL and area is not None: * raise TypeError('area must be a rectangle or None') # <<<<<<<<<<<<<< * * cdef Uint32 format_ */ - __pyx_tuple__22 = PyTuple_Pack(1, __pyx_kp_s_area_must_be_a_rectangle_or_None); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 939, __pyx_L1_error) + __pyx_tuple__22 = PyTuple_Pack(1, __pyx_kp_s_area_must_be_a_rectangle_or_None); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 941, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__22); __Pyx_GIVEREF(__pyx_tuple__22); @@ -23585,47 +23807,47 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__24); __Pyx_GIVEREF(__pyx_tuple__24); - /* "pygame/_sdl2/video.pyx":1011 + /* "pygame/_sdl2/video.pyx":1013 * 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__25 = PyTuple_Pack(1, __pyx_kp_s_srcrect_must_be_None_or_a_rectan); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 1011, __pyx_L1_error) + __pyx_tuple__25 = PyTuple_Pack(1, __pyx_kp_s_srcrect_must_be_None_or_a_rectan); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 1013, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__25); __Pyx_GIVEREF(__pyx_tuple__25); - /* "pygame/_sdl2/video.pyx":1021 + /* "pygame/_sdl2/video.pyx":1023 * 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__26 = PyTuple_Pack(1, __pyx_kp_s_rect_values_are_out_of_range); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(0, 1021, __pyx_L1_error) + __pyx_tuple__26 = PyTuple_Pack(1, __pyx_kp_s_rect_values_are_out_of_range); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(0, 1023, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__26); __Pyx_GIVEREF(__pyx_tuple__26); - /* "pygame/_sdl2/video.pyx":1034 + /* "pygame/_sdl2/video.pyx":1036 * @color.setter * def color(self, new_color): * self._color[:3] = new_color[:3] # <<<<<<<<<<<<<< * * @property */ - __pyx_slice__27 = PySlice_New(Py_None, __pyx_int_3, Py_None); if (unlikely(!__pyx_slice__27)) __PYX_ERR(0, 1034, __pyx_L1_error) + __pyx_slice__27 = PySlice_New(Py_None, __pyx_int_3, Py_None); if (unlikely(!__pyx_slice__27)) __PYX_ERR(0, 1036, __pyx_L1_error) __Pyx_GOTREF(__pyx_slice__27); __Pyx_GIVEREF(__pyx_slice__27); - /* "pygame/_sdl2/video.pyx":1093 + /* "pygame/_sdl2/video.pyx":1095 * 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__28 = PyTuple_Pack(1, __pyx_kp_s_srcrect_must_be_a_rect_or_None); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(0, 1093, __pyx_L1_error) + __pyx_tuple__28 = PyTuple_Pack(1, __pyx_kp_s_srcrect_must_be_a_rect_or_None); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(0, 1095, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__28); __Pyx_GIVEREF(__pyx_tuple__28); @@ -23648,91 +23870,91 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__30); __Pyx_GIVEREF(__pyx_tuple__30); - /* "pygame/_sdl2/video.pyx":1245 + /* "pygame/_sdl2/video.pyx":1264 * def draw_color(self, new_value): * # https://wiki.libsdl.org/SDL_SetRenderDrawColor * self._draw_color[:] = new_value # <<<<<<<<<<<<<< * cdef int res = SDL_SetRenderDrawColor(self._renderer, * new_value[0], */ - __pyx_slice__31 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__31)) __PYX_ERR(0, 1245, __pyx_L1_error) + __pyx_slice__31 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__31)) __PYX_ERR(0, 1264, __pyx_L1_error) __Pyx_GOTREF(__pyx_slice__31); __Pyx_GIVEREF(__pyx_slice__31); - /* "pygame/_sdl2/video.pyx":1295 + /* "pygame/_sdl2/video.pyx":1314 * 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__32 = PyTuple_Pack(1, __pyx_kp_s_expected_a_rectangle); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 1295, __pyx_L1_error) + __pyx_tuple__32 = PyTuple_Pack(1, __pyx_kp_s_expected_a_rectangle); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 1314, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__32); __Pyx_GIVEREF(__pyx_tuple__32); - /* "pygame/_sdl2/video.pyx":1360 + /* "pygame/_sdl2/video.pyx":1379 * 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__33 = PyTuple_Pack(1, __pyx_kp_s_target_must_be_a_Texture_or_None); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(0, 1360, __pyx_L1_error) + __pyx_tuple__33 = PyTuple_Pack(1, __pyx_kp_s_target_must_be_a_Texture_or_None); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(0, 1379, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__33); __Pyx_GIVEREF(__pyx_tuple__33); - /* "pygame/_sdl2/video.pyx":1380 + /* "pygame/_sdl2/video.pyx":1399 * (source).draw(area, dest) * elif not hasattr(source, 'draw'): * raise TypeError('source must be drawable') # <<<<<<<<<<<<<< * else: * source.draw(area, dest) */ - __pyx_tuple__34 = PyTuple_Pack(1, __pyx_kp_s_source_must_be_drawable); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(0, 1380, __pyx_L1_error) + __pyx_tuple__34 = PyTuple_Pack(1, __pyx_kp_s_source_must_be_drawable); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(0, 1399, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__34); __Pyx_GIVEREF(__pyx_tuple__34); - /* "pygame/_sdl2/video.pyx":1534 + /* "pygame/_sdl2/video.pyx":1553 * rectptr = pgRect_FromObject(area, &rarea) * if rectptr == NULL: * raise TypeError('area must be None or a rect') # <<<<<<<<<<<<<< * * # clip area */ - __pyx_tuple__35 = PyTuple_Pack(1, __pyx_kp_s_area_must_be_None_or_a_rect); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(0, 1534, __pyx_L1_error) + __pyx_tuple__35 = PyTuple_Pack(1, __pyx_kp_s_area_must_be_None_or_a_rect); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(0, 1553, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__35); __Pyx_GIVEREF(__pyx_tuple__35); - /* "pygame/_sdl2/video.pyx":1562 + /* "pygame/_sdl2/video.pyx":1581 * format) * if surf == NULL: * raise MemoryError("not enough memory for the surface") # <<<<<<<<<<<<<< * * surface = pgSurface_New2(surf, 1) */ - __pyx_tuple__36 = PyTuple_Pack(1, __pyx_kp_s_not_enough_memory_for_the_surfac); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(0, 1562, __pyx_L1_error) + __pyx_tuple__36 = PyTuple_Pack(1, __pyx_kp_s_not_enough_memory_for_the_surfac); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(0, 1581, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__36); __Pyx_GIVEREF(__pyx_tuple__36); - /* "pygame/_sdl2/video.pyx":1568 + /* "pygame/_sdl2/video.pyx":1587 * 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__37 = PyTuple_Pack(1, __pyx_kp_s_the_surface_is_too_small); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(0, 1568, __pyx_L1_error) + __pyx_tuple__37 = PyTuple_Pack(1, __pyx_kp_s_the_surface_is_too_small); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(0, 1587, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__37); __Pyx_GIVEREF(__pyx_tuple__37); - /* "pygame/_sdl2/video.pyx":1571 + /* "pygame/_sdl2/video.pyx":1590 * format = surf.format.format * else: * raise TypeError("'surface' must be a surface or None") # <<<<<<<<<<<<<< * * if SDL_RenderReadPixels(self._renderer, */ - __pyx_tuple__38 = PyTuple_Pack(1, __pyx_kp_s_surface_must_be_a_surface_or_No); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 1571, __pyx_L1_error) + __pyx_tuple__38 = PyTuple_Pack(1, __pyx_kp_s_surface_must_be_a_surface_or_No); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 1590, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__38); __Pyx_GIVEREF(__pyx_tuple__38); @@ -23755,88 +23977,88 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__40); __Pyx_GIVEREF(__pyx_tuple__40); - /* "pygame/_sdl2/video.pyx":24 + /* "pygame/_sdl2/video.pyx":25 * * 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__41 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 24, __pyx_L1_error) + __pyx_tuple__41 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 25, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__41); __Pyx_GIVEREF(__pyx_tuple__41); - __pyx_codeobj__42 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 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_repr, 24, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__42)) __PYX_ERR(0, 24, __pyx_L1_error) + __pyx_codeobj__42 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 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_repr, 25, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__42)) __PYX_ERR(0, 25, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":34 + /* "pygame/_sdl2/video.pyx":35 * ) * * def get_drivers(): # <<<<<<<<<<<<<< * """Yield info about the rendering drivers available for Renderer objects * """ */ - __pyx_tuple__43 = PyTuple_Pack(4, __pyx_n_s_num, __pyx_n_s_info, __pyx_n_s_ind, __pyx_n_s_ret); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(0, 34, __pyx_L1_error) + __pyx_tuple__43 = PyTuple_Pack(4, __pyx_n_s_num, __pyx_n_s_info, __pyx_n_s_ind, __pyx_n_s_ret); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(0, 35, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__43); __Pyx_GIVEREF(__pyx_tuple__43); - __pyx_codeobj_ = (PyObject*)__Pyx_PyCode_New(0, 0, 4, 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__sdl2_video, __pyx_n_s_get_drivers, 34, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj_)) __PYX_ERR(0, 34, __pyx_L1_error) + __pyx_codeobj_ = (PyObject*)__Pyx_PyCode_New(0, 0, 4, 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__sdl2_video, __pyx_n_s_get_drivers, 35, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj_)) __PYX_ERR(0, 35, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":51 + /* "pygame/_sdl2/video.pyx":52 * * * def get_grabbed_window(): # <<<<<<<<<<<<<< * """Get the window with input grab enabled * */ - __pyx_tuple__44 = PyTuple_Pack(2, __pyx_n_s_win, __pyx_n_s_ptr); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(0, 51, __pyx_L1_error) + __pyx_tuple__44 = PyTuple_Pack(2, __pyx_n_s_win, __pyx_n_s_ptr); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(0, 52, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__44); __Pyx_GIVEREF(__pyx_tuple__44); - __pyx_codeobj__45 = (PyObject*)__Pyx_PyCode_New(0, 0, 2, 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_get_grabbed_window, 51, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__45)) __PYX_ERR(0, 51, __pyx_L1_error) + __pyx_codeobj__45 = (PyObject*)__Pyx_PyCode_New(0, 0, 2, 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_get_grabbed_window, 52, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__45)) __PYX_ERR(0, 52, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":66 + /* "pygame/_sdl2/video.pyx":67 * return None * * def messagebox(title, message, # <<<<<<<<<<<<<< * Window window=None, * bint info=False, */ - __pyx_tuple__46 = 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__46)) __PYX_ERR(0, 66, __pyx_L1_error) + __pyx_tuple__46 = 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__46)) __PYX_ERR(0, 67, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__46); __Pyx_GIVEREF(__pyx_tuple__46); - __pyx_codeobj__47 = (PyObject*)__Pyx_PyCode_New(9, 0, 17, 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_src_c_cython_pygame__sdl2_video, __pyx_n_s_messagebox, 66, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__47)) __PYX_ERR(0, 66, __pyx_L1_error) + __pyx_codeobj__47 = (PyObject*)__Pyx_PyCode_New(9, 0, 17, 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_src_c_cython_pygame__sdl2_video, __pyx_n_s_messagebox, 67, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__47)) __PYX_ERR(0, 67, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":148 + /* "pygame/_sdl2/video.pyx":150 * - * cdef class Window: + * cdef class _Window: * DEFAULT_SIZE = 640, 480 # <<<<<<<<<<<<<< * * _kwarg_to_flag = { */ - __pyx_tuple__48 = PyTuple_Pack(2, __pyx_int_640, __pyx_int_480); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(0, 148, __pyx_L1_error) + __pyx_tuple__48 = PyTuple_Pack(2, __pyx_int_640, __pyx_int_480); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(0, 150, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__48); __Pyx_GIVEREF(__pyx_tuple__48); - /* "pygame/_sdl2/video.pyx":643 + /* "pygame/_sdl2/video.pyx":645 * * @staticmethod * def from_surface(Renderer renderer, surface): # <<<<<<<<<<<<<< * """Create a texture from an existing surface * */ - __pyx_tuple__49 = 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__49)) __PYX_ERR(0, 643, __pyx_L1_error) + __pyx_tuple__49 = 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__49)) __PYX_ERR(0, 645, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__49); __Pyx_GIVEREF(__pyx_tuple__49); - __pyx_codeobj__50 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 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__sdl2_video, __pyx_n_s_from_surface, 643, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__50)) __PYX_ERR(0, 643, __pyx_L1_error) + __pyx_codeobj__50 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 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__sdl2_video, __pyx_n_s_from_surface, 645, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__50)) __PYX_ERR(0, 645, __pyx_L1_error) - /* "pygame/_sdl2/video.pyx":1580 + /* "pygame/_sdl2/video.pyx":1599 * * @staticmethod * def compose_custom_blend_mode(color_mode, alpha_mode): # <<<<<<<<<<<<<< * """Compose a custom blend mode * */ - __pyx_tuple__51 = PyTuple_Pack(3, __pyx_n_s_color_mode, __pyx_n_s_alpha_mode, __pyx_n_s_res); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(0, 1580, __pyx_L1_error) + __pyx_tuple__51 = PyTuple_Pack(3, __pyx_n_s_color_mode, __pyx_n_s_alpha_mode, __pyx_n_s_res); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(0, 1599, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__51); __Pyx_GIVEREF(__pyx_tuple__51); - __pyx_codeobj__52 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__51, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_video, __pyx_n_s_compose_custom_blend_mode, 1580, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__52)) __PYX_ERR(0, 1580, __pyx_L1_error) + __pyx_codeobj__52 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__51, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_video, __pyx_n_s_compose_custom_blend_mode, 1599, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__52)) __PYX_ERR(0, 1599, __pyx_L1_error) __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; @@ -23845,7 +24067,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { } static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) { - if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error); + if (__Pyx_InitStrings(__pyx_string_tab) < 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_float_1_0 = PyFloat_FromDouble(1.0); if (unlikely(!__pyx_float_1_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) @@ -23895,6 +24117,7 @@ static int __Pyx_modinit_function_export_code(void) { 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; @@ -23906,30 +24129,34 @@ static int __Pyx_modinit_type_init_code(void) { if (!__pyx_ptype_6pygame_5_sdl2_5video_Color) __PYX_ERR(2, 484, __pyx_L1_error) __pyx_ptype_6pygame_5_sdl2_5video_Rect = __Pyx_ImportType(__pyx_t_1, "pygame", "Rect", sizeof(pgRectObject), __Pyx_ImportType_CheckSize_Warn); if (!__pyx_ptype_6pygame_5_sdl2_5video_Rect) __PYX_ERR(2, 488, __pyx_L1_error) - if (PyType_Ready(&__pyx_type_6pygame_5_sdl2_5video_Window) < 0) __PYX_ERR(0, 147, __pyx_L1_error) + __pyx_t_2 = PyImport_ImportModule("pygame._window"); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 492, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_ptype_6pygame_5_sdl2_5video_Window = __Pyx_ImportType(__pyx_t_2, "pygame._window", "Window", sizeof(pgWindowObject), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_6pygame_5_sdl2_5video_Window) __PYX_ERR(2, 492, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_6pygame_5_sdl2_5video__Window) < 0) __PYX_ERR(0, 149, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 - __pyx_type_6pygame_5_sdl2_5video_Window.tp_print = 0; + __pyx_type_6pygame_5_sdl2_5video__Window.tp_print = 0; #endif - if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6pygame_5_sdl2_5video_Window.tp_dictoffset && __pyx_type_6pygame_5_sdl2_5video_Window.tp_getattro == PyObject_GenericGetAttr)) { - __pyx_type_6pygame_5_sdl2_5video_Window.tp_getattro = __Pyx_PyObject_GenericGetAttr; + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6pygame_5_sdl2_5video__Window.tp_dictoffset && __pyx_type_6pygame_5_sdl2_5video__Window.tp_getattro == PyObject_GenericGetAttr)) { + __pyx_type_6pygame_5_sdl2_5video__Window.tp_getattro = __Pyx_PyObject_GenericGetAttr; } #if CYTHON_UPDATE_DESCRIPTOR_DOC { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_6pygame_5_sdl2_5video_Window, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 147, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_6pygame_5_sdl2_5video__Window, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 149, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { - __pyx_wrapperbase_6pygame_5_sdl2_5video_6Window_2__init__ = *((PyWrapperDescrObject *)wrapper)->d_base; - __pyx_wrapperbase_6pygame_5_sdl2_5video_6Window_2__init__.doc = __pyx_doc_6pygame_5_sdl2_5video_6Window_2__init__; - ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_6pygame_5_sdl2_5video_6Window_2__init__; + __pyx_wrapperbase_6pygame_5_sdl2_5video_7_Window_2__init__ = *((PyWrapperDescrObject *)wrapper)->d_base; + __pyx_wrapperbase_6pygame_5_sdl2_5video_7_Window_2__init__.doc = __pyx_doc_6pygame_5_sdl2_5video_7_Window_2__init__; + ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_6pygame_5_sdl2_5video_7_Window_2__init__; } } #endif - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Window, (PyObject *)&__pyx_type_6pygame_5_sdl2_5video_Window) < 0) __PYX_ERR(0, 147, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6pygame_5_sdl2_5video_Window) < 0) __PYX_ERR(0, 147, __pyx_L1_error) - __pyx_ptype_6pygame_5_sdl2_5video_Window = &__pyx_type_6pygame_5_sdl2_5video_Window; + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Window, (PyObject *)&__pyx_type_6pygame_5_sdl2_5video__Window) < 0) __PYX_ERR(0, 149, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6pygame_5_sdl2_5video__Window) < 0) __PYX_ERR(0, 149, __pyx_L1_error) + __pyx_ptype_6pygame_5_sdl2_5video__Window = &__pyx_type_6pygame_5_sdl2_5video__Window; __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 (PyType_Ready(&__pyx_type_6pygame_5_sdl2_5video_Renderer) < 0) __PYX_ERR(0, 1123, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_6pygame_5_sdl2_5video_Renderer) < 0) __PYX_ERR(0, 1125, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6pygame_5_sdl2_5video_Renderer.tp_print = 0; #endif @@ -23938,7 +24165,7 @@ static int __Pyx_modinit_type_init_code(void) { } #if CYTHON_UPDATE_DESCRIPTOR_DOC { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_6pygame_5_sdl2_5video_Renderer, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 1123, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_6pygame_5_sdl2_5video_Renderer, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 1125, __pyx_L1_error) if (Py_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__; @@ -23946,14 +24173,14 @@ static int __Pyx_modinit_type_init_code(void) { } } #endif - if (__Pyx_SetVtable(__pyx_type_6pygame_5_sdl2_5video_Renderer.tp_dict, __pyx_vtabptr_6pygame_5_sdl2_5video_Renderer) < 0) __PYX_ERR(0, 1123, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Renderer, (PyObject *)&__pyx_type_6pygame_5_sdl2_5video_Renderer) < 0) __PYX_ERR(0, 1123, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6pygame_5_sdl2_5video_Renderer) < 0) __PYX_ERR(0, 1123, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_6pygame_5_sdl2_5video_Renderer.tp_dict, __pyx_vtabptr_6pygame_5_sdl2_5video_Renderer) < 0) __PYX_ERR(0, 1125, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Renderer, (PyObject *)&__pyx_type_6pygame_5_sdl2_5video_Renderer) < 0) __PYX_ERR(0, 1125, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6pygame_5_sdl2_5video_Renderer) < 0) __PYX_ERR(0, 1125, __pyx_L1_error) __pyx_ptype_6pygame_5_sdl2_5video_Renderer = &__pyx_type_6pygame_5_sdl2_5video_Renderer; __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 (PyType_Ready(&__pyx_type_6pygame_5_sdl2_5video_Texture) < 0) __PYX_ERR(0, 538, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_6pygame_5_sdl2_5video_Texture) < 0) __PYX_ERR(0, 540, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6pygame_5_sdl2_5video_Texture.tp_print = 0; #endif @@ -23962,7 +24189,7 @@ static int __Pyx_modinit_type_init_code(void) { } #if CYTHON_UPDATE_DESCRIPTOR_DOC { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_6pygame_5_sdl2_5video_Texture, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 538, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_6pygame_5_sdl2_5video_Texture, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 540, __pyx_L1_error) if (Py_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__; @@ -23970,13 +24197,13 @@ static int __Pyx_modinit_type_init_code(void) { } } #endif - if (__Pyx_SetVtable(__pyx_type_6pygame_5_sdl2_5video_Texture.tp_dict, __pyx_vtabptr_6pygame_5_sdl2_5video_Texture) < 0) __PYX_ERR(0, 538, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Texture, (PyObject *)&__pyx_type_6pygame_5_sdl2_5video_Texture) < 0) __PYX_ERR(0, 538, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6pygame_5_sdl2_5video_Texture) < 0) __PYX_ERR(0, 538, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_6pygame_5_sdl2_5video_Texture.tp_dict, __pyx_vtabptr_6pygame_5_sdl2_5video_Texture) < 0) __PYX_ERR(0, 540, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Texture, (PyObject *)&__pyx_type_6pygame_5_sdl2_5video_Texture) < 0) __PYX_ERR(0, 540, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6pygame_5_sdl2_5video_Texture) < 0) __PYX_ERR(0, 540, __pyx_L1_error) __pyx_ptype_6pygame_5_sdl2_5video_Texture = &__pyx_type_6pygame_5_sdl2_5video_Texture; __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 (PyType_Ready(&__pyx_type_6pygame_5_sdl2_5video_Image) < 0) __PYX_ERR(0, 969, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_6pygame_5_sdl2_5video_Image) < 0) __PYX_ERR(0, 971, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6pygame_5_sdl2_5video_Image.tp_print = 0; #endif @@ -23985,7 +24212,7 @@ static int __Pyx_modinit_type_init_code(void) { } #if CYTHON_UPDATE_DESCRIPTOR_DOC { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_6pygame_5_sdl2_5video_Image, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 969, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_6pygame_5_sdl2_5video_Image, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 971, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_6pygame_5_sdl2_5video_5Image_2__init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_6pygame_5_sdl2_5video_5Image_2__init__.doc = __pyx_doc_6pygame_5_sdl2_5video_5Image_2__init__; @@ -23993,11 +24220,11 @@ static int __Pyx_modinit_type_init_code(void) { } } #endif - if (__Pyx_SetVtable(__pyx_type_6pygame_5_sdl2_5video_Image.tp_dict, __pyx_vtabptr_6pygame_5_sdl2_5video_Image) < 0) __PYX_ERR(0, 969, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Image, (PyObject *)&__pyx_type_6pygame_5_sdl2_5video_Image) < 0) __PYX_ERR(0, 969, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6pygame_5_sdl2_5video_Image) < 0) __PYX_ERR(0, 969, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_6pygame_5_sdl2_5video_Image.tp_dict, __pyx_vtabptr_6pygame_5_sdl2_5video_Image) < 0) __PYX_ERR(0, 971, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Image, (PyObject *)&__pyx_type_6pygame_5_sdl2_5video_Image) < 0) __PYX_ERR(0, 971, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6pygame_5_sdl2_5video_Image) < 0) __PYX_ERR(0, 971, __pyx_L1_error) __pyx_ptype_6pygame_5_sdl2_5video_Image = &__pyx_type_6pygame_5_sdl2_5video_Image; - if (PyType_Ready(&__pyx_type_6pygame_5_sdl2_5video___pyx_scope_struct__get_drivers) < 0) __PYX_ERR(0, 34, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_6pygame_5_sdl2_5video___pyx_scope_struct__get_drivers) < 0) __PYX_ERR(0, 35, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6pygame_5_sdl2_5video___pyx_scope_struct__get_drivers.tp_print = 0; #endif @@ -24006,10 +24233,12 @@ static int __Pyx_modinit_type_init_code(void) { } __pyx_ptype_6pygame_5_sdl2_5video___pyx_scope_struct__get_drivers = &__pyx_type_6pygame_5_sdl2_5video___pyx_scope_struct__get_drivers; __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; } @@ -24234,7 +24463,7 @@ if (!__Pyx_RefNanny) { Py_INCREF(__pyx_b); __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) Py_INCREF(__pyx_cython_runtime); - if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error); + if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error) /*--- Initialize various global constants etc. ---*/ 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) @@ -24428,7 +24657,7 @@ if (!__Pyx_RefNanny) { * import_pygame_color() * import_pygame_surface() # <<<<<<<<<<<<<< * import_pygame_rect() - * + * import_pygame_window() */ import_pygame_surface(); @@ -24436,442 +24665,463 @@ if (!__Pyx_RefNanny) { * import_pygame_color() * import_pygame_surface() * import_pygame_rect() # <<<<<<<<<<<<<< + * import_pygame_window() * - * class RendererDriverInfo: */ import_pygame_rect(); - /* "pygame/_sdl2/video.pyx":23 + /* "pygame/_sdl2/video.pyx":22 + * import_pygame_surface() * import_pygame_rect() + * import_pygame_window() # <<<<<<<<<<<<<< + * + * class RendererDriverInfo: + */ + import_pygame_window(); + + /* "pygame/_sdl2/video.pyx":24 + * import_pygame_window() * * 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_1 = __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_1)) __PYX_ERR(0, 23, __pyx_L1_error) + __pyx_t_1 = __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_1)) __PYX_ERR(0, 24, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - /* "pygame/_sdl2/video.pyx":24 + /* "pygame/_sdl2/video.pyx":25 * * 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_2 = __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__42)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 24, __pyx_L1_error) + __pyx_t_2 = __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__42)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 25, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_repr, __pyx_t_2) < 0) __PYX_ERR(0, 24, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_repr, __pyx_t_2) < 0) __PYX_ERR(0, 25, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sdl2/video.pyx":23 - * import_pygame_rect() + /* "pygame/_sdl2/video.pyx":24 + * import_pygame_window() * * 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_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_RendererDriverInfo, __pyx_empty_tuple, __pyx_t_1, NULL, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 23, __pyx_L1_error) + __pyx_t_2 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_RendererDriverInfo, __pyx_empty_tuple, __pyx_t_1, NULL, 0, 0); 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_RendererDriverInfo, __pyx_t_2) < 0) __PYX_ERR(0, 23, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_RendererDriverInfo, __pyx_t_2) < 0) __PYX_ERR(0, 24, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sdl2/video.pyx":34 + /* "pygame/_sdl2/video.pyx":35 * ) * * def get_drivers(): # <<<<<<<<<<<<<< * """Yield info about the rendering drivers available for Renderer objects * """ */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6pygame_5_sdl2_5video_1get_drivers, NULL, __pyx_n_s_pygame__sdl2_video); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error) + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6pygame_5_sdl2_5video_1get_drivers, NULL, __pyx_n_s_pygame__sdl2_video); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 35, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_drivers, __pyx_t_1) < 0) __PYX_ERR(0, 34, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_drivers, __pyx_t_1) < 0) __PYX_ERR(0, 35, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sdl2/video.pyx":51 + /* "pygame/_sdl2/video.pyx":52 * * * def get_grabbed_window(): # <<<<<<<<<<<<<< * """Get the window with input grab enabled * */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6pygame_5_sdl2_5video_4get_grabbed_window, NULL, __pyx_n_s_pygame__sdl2_video); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 51, __pyx_L1_error) + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6pygame_5_sdl2_5video_4get_grabbed_window, NULL, __pyx_n_s_pygame__sdl2_video); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 52, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_grabbed_window, __pyx_t_1) < 0) __PYX_ERR(0, 51, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_grabbed_window, __pyx_t_1) < 0) __PYX_ERR(0, 52, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sdl2/video.pyx":66 + /* "pygame/_sdl2/video.pyx":67 * return None * * def messagebox(title, message, # <<<<<<<<<<<<<< * Window window=None, * bint info=False, */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6pygame_5_sdl2_5video_6messagebox, NULL, __pyx_n_s_pygame__sdl2_video); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 66, __pyx_L1_error) + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6pygame_5_sdl2_5video_6messagebox, NULL, __pyx_n_s_pygame__sdl2_video); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 67, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_messagebox, __pyx_t_1) < 0) __PYX_ERR(0, 67, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "pygame/_sdl2/video.pyx":147 + * return buttonid + * + * globals()["Window"]=Window # <<<<<<<<<<<<<< + * + * cdef class _Window: + */ + __pyx_t_1 = __Pyx_Globals(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 147, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_messagebox, __pyx_t_1) < 0) __PYX_ERR(0, 66, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_n_s_Window_2, ((PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Window)) < 0)) __PYX_ERR(0, 147, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sdl2/video.pyx":148 + /* "pygame/_sdl2/video.pyx":150 * - * cdef class Window: + * cdef class _Window: * DEFAULT_SIZE = 640, 480 # <<<<<<<<<<<<<< * * _kwarg_to_flag = { */ - if (PyDict_SetItem((PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Window->tp_dict, __pyx_n_s_DEFAULT_SIZE, __pyx_tuple__48) < 0) __PYX_ERR(0, 148, __pyx_L1_error) - PyType_Modified(__pyx_ptype_6pygame_5_sdl2_5video_Window); + if (PyDict_SetItem((PyObject *)__pyx_ptype_6pygame_5_sdl2_5video__Window->tp_dict, __pyx_n_s_DEFAULT_SIZE, __pyx_tuple__48) < 0) __PYX_ERR(0, 150, __pyx_L1_error) + PyType_Modified(__pyx_ptype_6pygame_5_sdl2_5video__Window); - /* "pygame/_sdl2/video.pyx":151 + /* "pygame/_sdl2/video.pyx":153 * * _kwarg_to_flag = { * 'opengl': _SDL_WINDOW_OPENGL, # <<<<<<<<<<<<<< * 'vulkan': _SDL_WINDOW_VULKAN, * 'hidden': _SDL_WINDOW_HIDDEN, */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(18); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 151, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(18); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyInt_From_Uint32(SDL_WINDOW_OPENGL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 151, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_Uint32(SDL_WINDOW_OPENGL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_opengl, __pyx_t_2) < 0) __PYX_ERR(0, 151, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_opengl, __pyx_t_2) < 0) __PYX_ERR(0, 153, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sdl2/video.pyx":152 + /* "pygame/_sdl2/video.pyx":154 * _kwarg_to_flag = { * 'opengl': _SDL_WINDOW_OPENGL, * 'vulkan': _SDL_WINDOW_VULKAN, # <<<<<<<<<<<<<< * 'hidden': _SDL_WINDOW_HIDDEN, * 'borderless': _SDL_WINDOW_BORDERLESS, */ - __pyx_t_2 = __Pyx_PyInt_From_Uint32(SDL_WINDOW_VULKAN); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 152, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_Uint32(SDL_WINDOW_VULKAN); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 154, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_vulkan, __pyx_t_2) < 0) __PYX_ERR(0, 151, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_vulkan, __pyx_t_2) < 0) __PYX_ERR(0, 153, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sdl2/video.pyx":153 + /* "pygame/_sdl2/video.pyx":155 * 'opengl': _SDL_WINDOW_OPENGL, * 'vulkan': _SDL_WINDOW_VULKAN, * 'hidden': _SDL_WINDOW_HIDDEN, # <<<<<<<<<<<<<< * 'borderless': _SDL_WINDOW_BORDERLESS, * 'resizable': _SDL_WINDOW_RESIZABLE, */ - __pyx_t_2 = __Pyx_PyInt_From_Uint32(SDL_WINDOW_HIDDEN); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 153, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_Uint32(SDL_WINDOW_HIDDEN); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_hidden, __pyx_t_2) < 0) __PYX_ERR(0, 151, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_hidden, __pyx_t_2) < 0) __PYX_ERR(0, 153, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sdl2/video.pyx":154 + /* "pygame/_sdl2/video.pyx":156 * 'vulkan': _SDL_WINDOW_VULKAN, * 'hidden': _SDL_WINDOW_HIDDEN, * 'borderless': _SDL_WINDOW_BORDERLESS, # <<<<<<<<<<<<<< * 'resizable': _SDL_WINDOW_RESIZABLE, * 'minimized': _SDL_WINDOW_MINIMIZED, */ - __pyx_t_2 = __Pyx_PyInt_From_Uint32(SDL_WINDOW_BORDERLESS); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 154, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_Uint32(SDL_WINDOW_BORDERLESS); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 156, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_borderless, __pyx_t_2) < 0) __PYX_ERR(0, 151, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_borderless, __pyx_t_2) < 0) __PYX_ERR(0, 153, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sdl2/video.pyx":155 + /* "pygame/_sdl2/video.pyx":157 * 'hidden': _SDL_WINDOW_HIDDEN, * 'borderless': _SDL_WINDOW_BORDERLESS, * 'resizable': _SDL_WINDOW_RESIZABLE, # <<<<<<<<<<<<<< * 'minimized': _SDL_WINDOW_MINIMIZED, * 'maximized': _SDL_WINDOW_MAXIMIZED, */ - __pyx_t_2 = __Pyx_PyInt_From_Uint32(SDL_WINDOW_RESIZABLE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 155, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_Uint32(SDL_WINDOW_RESIZABLE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 157, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_resizable, __pyx_t_2) < 0) __PYX_ERR(0, 151, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_resizable, __pyx_t_2) < 0) __PYX_ERR(0, 153, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sdl2/video.pyx":156 + /* "pygame/_sdl2/video.pyx":158 * 'borderless': _SDL_WINDOW_BORDERLESS, * 'resizable': _SDL_WINDOW_RESIZABLE, * 'minimized': _SDL_WINDOW_MINIMIZED, # <<<<<<<<<<<<<< * 'maximized': _SDL_WINDOW_MAXIMIZED, * 'input_grabbed': _SDL_WINDOW_INPUT_GRABBED, */ - __pyx_t_2 = __Pyx_PyInt_From_Uint32(SDL_WINDOW_MINIMIZED); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 156, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_Uint32(SDL_WINDOW_MINIMIZED); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 158, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_minimized, __pyx_t_2) < 0) __PYX_ERR(0, 151, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_minimized, __pyx_t_2) < 0) __PYX_ERR(0, 153, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sdl2/video.pyx":157 + /* "pygame/_sdl2/video.pyx":159 * '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_2 = __Pyx_PyInt_From_Uint32(SDL_WINDOW_MAXIMIZED); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 157, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_Uint32(SDL_WINDOW_MAXIMIZED); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 159, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_maximized, __pyx_t_2) < 0) __PYX_ERR(0, 151, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_maximized, __pyx_t_2) < 0) __PYX_ERR(0, 153, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sdl2/video.pyx":158 + /* "pygame/_sdl2/video.pyx":160 * '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_2 = __Pyx_PyInt_From_Uint32(SDL_WINDOW_INPUT_GRABBED); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 158, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_Uint32(SDL_WINDOW_INPUT_GRABBED); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_input_grabbed, __pyx_t_2) < 0) __PYX_ERR(0, 151, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_input_grabbed, __pyx_t_2) < 0) __PYX_ERR(0, 153, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sdl2/video.pyx":159 + /* "pygame/_sdl2/video.pyx":161 * '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_2 = __Pyx_PyInt_From_Uint32(SDL_WINDOW_INPUT_FOCUS); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 159, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_Uint32(SDL_WINDOW_INPUT_FOCUS); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_input_focus, __pyx_t_2) < 0) __PYX_ERR(0, 151, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_input_focus, __pyx_t_2) < 0) __PYX_ERR(0, 153, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sdl2/video.pyx":160 + /* "pygame/_sdl2/video.pyx":162 * '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_2 = __Pyx_PyInt_From_Uint32(SDL_WINDOW_MOUSE_FOCUS); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 160, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_Uint32(SDL_WINDOW_MOUSE_FOCUS); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 162, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_mouse_focus, __pyx_t_2) < 0) __PYX_ERR(0, 151, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_mouse_focus, __pyx_t_2) < 0) __PYX_ERR(0, 153, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sdl2/video.pyx":161 + /* "pygame/_sdl2/video.pyx":163 * '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_2 = __Pyx_PyInt_From_Uint32(SDL_WINDOW_ALLOW_HIGHDPI); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 161, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_Uint32(SDL_WINDOW_ALLOW_HIGHDPI); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 163, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_allow_highdpi, __pyx_t_2) < 0) __PYX_ERR(0, 151, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_allow_highdpi, __pyx_t_2) < 0) __PYX_ERR(0, 153, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sdl2/video.pyx":162 + /* "pygame/_sdl2/video.pyx":164 * '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_2 = __Pyx_PyInt_From_Uint32(SDL_WINDOW_FOREIGN); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 162, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_Uint32(SDL_WINDOW_FOREIGN); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 164, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_foreign, __pyx_t_2) < 0) __PYX_ERR(0, 151, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_foreign, __pyx_t_2) < 0) __PYX_ERR(0, 153, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sdl2/video.pyx":163 + /* "pygame/_sdl2/video.pyx":165 * '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_2 = __Pyx_PyInt_From_Uint32(SDL_WINDOW_MOUSE_CAPTURE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 163, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_Uint32(SDL_WINDOW_MOUSE_CAPTURE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 165, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_mouse_capture, __pyx_t_2) < 0) __PYX_ERR(0, 151, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_mouse_capture, __pyx_t_2) < 0) __PYX_ERR(0, 153, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sdl2/video.pyx":164 + /* "pygame/_sdl2/video.pyx":166 * '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_2 = __Pyx_PyInt_From_Uint32(SDL_WINDOW_ALWAYS_ON_TOP); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 164, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_Uint32(SDL_WINDOW_ALWAYS_ON_TOP); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_always_on_top, __pyx_t_2) < 0) __PYX_ERR(0, 151, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_always_on_top, __pyx_t_2) < 0) __PYX_ERR(0, 153, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sdl2/video.pyx":165 + /* "pygame/_sdl2/video.pyx":167 * '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_2 = __Pyx_PyInt_From_Uint32(SDL_WINDOW_SKIP_TASKBAR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 165, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_Uint32(SDL_WINDOW_SKIP_TASKBAR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 167, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_skip_taskbar, __pyx_t_2) < 0) __PYX_ERR(0, 151, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_skip_taskbar, __pyx_t_2) < 0) __PYX_ERR(0, 153, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sdl2/video.pyx":166 + /* "pygame/_sdl2/video.pyx":168 * '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_2 = __Pyx_PyInt_From_Uint32(SDL_WINDOW_UTILITY); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 166, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_Uint32(SDL_WINDOW_UTILITY); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 168, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_utility, __pyx_t_2) < 0) __PYX_ERR(0, 151, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_utility, __pyx_t_2) < 0) __PYX_ERR(0, 153, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sdl2/video.pyx":167 + /* "pygame/_sdl2/video.pyx":169 * 'skip_taskbar': _SDL_WINDOW_SKIP_TASKBAR, * 'utility': _SDL_WINDOW_UTILITY, * 'tooltip': _SDL_WINDOW_TOOLTIP, # <<<<<<<<<<<<<< * 'popup_menu': _SDL_WINDOW_POPUP_MENU, * } */ - __pyx_t_2 = __Pyx_PyInt_From_Uint32(SDL_WINDOW_TOOLTIP); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 167, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_Uint32(SDL_WINDOW_TOOLTIP); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 169, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_tooltip, __pyx_t_2) < 0) __PYX_ERR(0, 151, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_tooltip, __pyx_t_2) < 0) __PYX_ERR(0, 153, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sdl2/video.pyx":168 + /* "pygame/_sdl2/video.pyx":170 * 'utility': _SDL_WINDOW_UTILITY, * 'tooltip': _SDL_WINDOW_TOOLTIP, * 'popup_menu': _SDL_WINDOW_POPUP_MENU, # <<<<<<<<<<<<<< * } * */ - __pyx_t_2 = __Pyx_PyInt_From_Uint32(SDL_WINDOW_POPUP_MENU); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 168, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_Uint32(SDL_WINDOW_POPUP_MENU); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 170, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_popup_menu, __pyx_t_2) < 0) __PYX_ERR(0, 151, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_popup_menu, __pyx_t_2) < 0) __PYX_ERR(0, 153, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem((PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Window->tp_dict, __pyx_n_s_kwarg_to_flag, __pyx_t_1) < 0) __PYX_ERR(0, 150, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_6pygame_5_sdl2_5video__Window->tp_dict, __pyx_n_s_kwarg_to_flag, __pyx_t_1) < 0) __PYX_ERR(0, 152, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - PyType_Modified(__pyx_ptype_6pygame_5_sdl2_5video_Window); + PyType_Modified(__pyx_ptype_6pygame_5_sdl2_5video__Window); - /* "pygame/_sdl2/video.pyx":172 + /* "pygame/_sdl2/video.pyx":174 * * @classmethod * def from_display_module(cls): # <<<<<<<<<<<<<< * """Create a Window object using window data from display module * */ - __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Window, __pyx_n_s_from_display_module); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 172, __pyx_L1_error) + __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_6pygame_5_sdl2_5video__Window, __pyx_n_s_from_display_module); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - /* "pygame/_sdl2/video.pyx":171 + /* "pygame/_sdl2/video.pyx":173 * } * * @classmethod # <<<<<<<<<<<<<< * def from_display_module(cls): * """Create a Window object using window data from display module */ - __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 171, __pyx_L1_error) + __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 173, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (PyDict_SetItem((PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Window->tp_dict, __pyx_n_s_from_display_module, __pyx_t_2) < 0) __PYX_ERR(0, 172, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_6pygame_5_sdl2_5video__Window->tp_dict, __pyx_n_s_from_display_module, __pyx_t_2) < 0) __PYX_ERR(0, 174, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - PyType_Modified(__pyx_ptype_6pygame_5_sdl2_5video_Window); + PyType_Modified(__pyx_ptype_6pygame_5_sdl2_5video__Window); - /* "pygame/_sdl2/video.pyx":188 + /* "pygame/_sdl2/video.pyx":190 * * def __init__(self, title='pygame window', * size=DEFAULT_SIZE, # <<<<<<<<<<<<<< * position=WINDOWPOS_UNDEFINED, * bint fullscreen=False, */ - __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Window, __pyx_n_s_DEFAULT_SIZE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 188, __pyx_L1_error) + __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_6pygame_5_sdl2_5video__Window, __pyx_n_s_DEFAULT_SIZE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 190, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_k__3 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sdl2/video.pyx":189 + /* "pygame/_sdl2/video.pyx":191 * def __init__(self, title='pygame window', * size=DEFAULT_SIZE, * position=WINDOWPOS_UNDEFINED, # <<<<<<<<<<<<<< * bint fullscreen=False, * bint fullscreen_desktop=False, **kwargs): */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_WINDOWPOS_UNDEFINED); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 189, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_WINDOWPOS_UNDEFINED); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_k__4 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sdl2/video.pyx":643 + /* "pygame/_sdl2/video.pyx":645 * * @staticmethod * def from_surface(Renderer renderer, surface): # <<<<<<<<<<<<<< * """Create a texture from an existing surface * */ - __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pygame_5_sdl2_5video_7Texture_5from_surface, NULL, __pyx_n_s_pygame__sdl2_video); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 643, __pyx_L1_error) + __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pygame_5_sdl2_5video_7Texture_5from_surface, NULL, __pyx_n_s_pygame__sdl2_video); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 645, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem((PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Texture->tp_dict, __pyx_n_s_from_surface, __pyx_t_2) < 0) __PYX_ERR(0, 643, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Texture->tp_dict, __pyx_n_s_from_surface, __pyx_t_2) < 0) __PYX_ERR(0, 645, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_6pygame_5_sdl2_5video_Texture); - /* "pygame/_sdl2/video.pyx":642 + /* "pygame/_sdl2/video.pyx":644 * self.width, self.height = width, height * * @staticmethod # <<<<<<<<<<<<<< * def from_surface(Renderer renderer, surface): * """Create a texture from an existing surface */ - __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Texture, __pyx_n_s_from_surface); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 643, __pyx_L1_error) + __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Texture, __pyx_n_s_from_surface); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 645, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 642, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 644, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem((PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Texture->tp_dict, __pyx_n_s_from_surface, __pyx_t_1) < 0) __PYX_ERR(0, 643, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Texture->tp_dict, __pyx_n_s_from_surface, __pyx_t_1) < 0) __PYX_ERR(0, 645, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_6pygame_5_sdl2_5video_Texture); - /* "pygame/_sdl2/video.pyx":1126 + /* "pygame/_sdl2/video.pyx":1128 * * @classmethod - * def from_window(cls, Window window): # <<<<<<<<<<<<<< - * cdef Renderer self = cls.__new__(cls) - * self._win = window + * def from_window(cls, window): # <<<<<<<<<<<<<< + * cdef Window _window + * if isinstance(window,(_Window,Window)): */ - __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Renderer, __pyx_n_s_from_window); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1126, __pyx_L1_error) + __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Renderer, __pyx_n_s_from_window); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1128, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - /* "pygame/_sdl2/video.pyx":1125 + /* "pygame/_sdl2/video.pyx":1127 * cdef class Renderer: * * @classmethod # <<<<<<<<<<<<<< - * def from_window(cls, Window window): - * cdef Renderer self = cls.__new__(cls) + * def from_window(cls, window): + * cdef Window _window */ - __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1125, __pyx_L1_error) + __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1127, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (PyDict_SetItem((PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Renderer->tp_dict, __pyx_n_s_from_window, __pyx_t_2) < 0) __PYX_ERR(0, 1126, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Renderer->tp_dict, __pyx_n_s_from_window, __pyx_t_2) < 0) __PYX_ERR(0, 1128, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_6pygame_5_sdl2_5video_Renderer); - /* "pygame/_sdl2/video.pyx":1580 + /* "pygame/_sdl2/video.pyx":1599 * * @staticmethod * def compose_custom_blend_mode(color_mode, alpha_mode): # <<<<<<<<<<<<<< * """Compose a custom blend mode * */ - __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pygame_5_sdl2_5video_8Renderer_35compose_custom_blend_mode, NULL, __pyx_n_s_pygame__sdl2_video); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1580, __pyx_L1_error) + __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pygame_5_sdl2_5video_8Renderer_35compose_custom_blend_mode, NULL, __pyx_n_s_pygame__sdl2_video); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1599, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem((PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Renderer->tp_dict, __pyx_n_s_compose_custom_blend_mode, __pyx_t_2) < 0) __PYX_ERR(0, 1580, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Renderer->tp_dict, __pyx_n_s_compose_custom_blend_mode, __pyx_t_2) < 0) __PYX_ERR(0, 1599, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_6pygame_5_sdl2_5video_Renderer); - /* "pygame/_sdl2/video.pyx":1579 + /* "pygame/_sdl2/video.pyx":1598 * return surface * * @staticmethod # <<<<<<<<<<<<<< * def compose_custom_blend_mode(color_mode, alpha_mode): * """Compose a custom blend mode */ - __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Renderer, __pyx_n_s_compose_custom_blend_mode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1580, __pyx_L1_error) + __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Renderer, __pyx_n_s_compose_custom_blend_mode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1599, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1579, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1598, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem((PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Renderer->tp_dict, __pyx_n_s_compose_custom_blend_mode, __pyx_t_1) < 0) __PYX_ERR(0, 1580, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Renderer->tp_dict, __pyx_n_s_compose_custom_blend_mode, __pyx_t_1) < 0) __PYX_ERR(0, 1599, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_6pygame_5_sdl2_5video_Renderer); @@ -25184,7 +25434,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { return __Pyx_PyFunction_FastCall(func, NULL, 0); } #endif -#ifdef __Pyx_CyFunction_USED +#if defined(__Pyx_CyFunction_USED) && defined(NDEBUG) if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func))) #else if (likely(PyCFunction_Check(func))) @@ -25998,10 +26248,8 @@ static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) { Py_DECREF(retval); __Pyx_RaiseTooManyValuesError(expected); return -1; - } else { - return __Pyx_IterFinish(); } - return 0; + return __Pyx_IterFinish(); } /* PyObjectGetMethod */ @@ -26387,7 +26635,7 @@ static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, /* ObjectGetItem */ #if CYTHON_USE_TYPE_SLOTS static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject* index) { - PyObject *runerr; + PyObject *runerr = NULL; Py_ssize_t key_value; PySequenceMethods *m = Py_TYPE(obj)->tp_as_sequence; if (unlikely(!(m && m->sq_item))) { @@ -26644,9 +26892,7 @@ static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno, PyGILState_STATE state; if (nogil) state = PyGILState_Ensure(); -#ifdef _MSC_VER - else state = (PyGILState_STATE)-1; -#endif + else state = (PyGILState_STATE)0; #endif __Pyx_PyThreadState_assign __Pyx_ErrFetch(&old_exc, &old_val, &old_tb); @@ -27770,9 +28016,14 @@ static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, P 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); @@ -28003,6 +28254,51 @@ static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObj return result; } +/* Globals */ +static PyObject* __Pyx_Globals(void) { + Py_ssize_t i; + PyObject *names; + PyObject *globals = __pyx_d; + Py_INCREF(globals); + names = PyObject_Dir(__pyx_m); + if (!names) + goto bad; + for (i = PyList_GET_SIZE(names)-1; i >= 0; i--) { +#if CYTHON_COMPILING_IN_PYPY + PyObject* name = PySequence_ITEM(names, i); + if (!name) + goto bad; +#else + PyObject* name = PyList_GET_ITEM(names, i); +#endif + if (!PyDict_Contains(globals, name)) { + PyObject* value = __Pyx_GetAttr(__pyx_m, name); + if (!value) { +#if CYTHON_COMPILING_IN_PYPY + Py_DECREF(name); +#endif + goto bad; + } + if (PyDict_SetItem(globals, name, value) < 0) { +#if CYTHON_COMPILING_IN_PYPY + Py_DECREF(name); +#endif + Py_DECREF(value); + goto bad; + } + } +#if CYTHON_COMPILING_IN_PYPY + Py_DECREF(name); +#endif + } + Py_DECREF(names); + return globals; +bad: + Py_XDECREF(names); + Py_XDECREF(globals); + return NULL; +} + /* ClassMethod */ static PyObject* __Pyx_Method_ClassMethod(PyObject *method) { #if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM <= 0x05080000 @@ -28066,7 +28362,7 @@ static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name) { /* CLineInTraceback */ #ifndef CYTHON_CLINE_IN_TRACEBACK -static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) { +static int __Pyx_CLineForTraceback(CYTHON_UNUSED PyThreadState *tstate, int c_line) { PyObject *use_cline; PyObject *ptype, *pvalue, *ptraceback; #if CYTHON_COMPILING_IN_CPYTHON diff --git a/src_c/constants.c b/src_c/constants.c index 7bb99137c3..6edafcaeb2 100644 --- a/src_c/constants.c +++ b/src_c/constants.c @@ -634,6 +634,9 @@ MODINIT_DEFINE(constants) // https://github.com/pygame-community/pygame-ce/issues/1845 DEC_CONSTS(IS_CE, 1) + DEC_CONSTS(WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED); + DEC_CONSTS(WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED); + if (PyModule_AddObject(module, "__all__", all_list)) { Py_DECREF(all_list); Py_DECREF(module); diff --git a/src_c/cython/pygame/_sdl2/video.pxd b/src_c/cython/pygame/_sdl2/video.pxd index 080bda38f7..23d89382eb 100644 --- a/src_c/cython/pygame/_sdl2/video.pxd +++ b/src_c/cython/pygame/_sdl2/video.pxd @@ -489,6 +489,10 @@ cdef extern from "pygame.h" nogil: cdef SDL_Rect r cdef object weakreflist + ctypedef class pygame._window.Window [object pgWindowObject]: + cdef SDL_Window *_win + cdef SDL_bool _is_borrowed + ctypedef struct pgSurfaceObject int pgSurface_Check(object surf) @@ -508,8 +512,10 @@ cdef extern from "pygame.h" nogil: void import_pygame_color() pgSurfaceObject *pgSurface_New2(SDL_Surface *info, int owner) + int pgWindow_Check(object win) + void import_pygame_window() -cdef class Window: +cdef class _Window: cdef SDL_Window* _win cdef int _is_borrowed diff --git a/src_c/cython/pygame/_sdl2/video.pyx b/src_c/cython/pygame/_sdl2/video.pyx index f873064ae1..af907e9c61 100644 --- a/src_c/cython/pygame/_sdl2/video.pyx +++ b/src_c/cython/pygame/_sdl2/video.pyx @@ -19,6 +19,7 @@ import_pygame_base() import_pygame_color() import_pygame_surface() import_pygame_rect() +import_pygame_window() class RendererDriverInfo: def __repr__(self): @@ -143,8 +144,9 @@ def messagebox(title, message, free(c_buttons) return buttonid +globals()["Window"]=Window -cdef class Window: +cdef class _Window: DEFAULT_SIZE = 640, 480 _kwarg_to_flag = { @@ -175,7 +177,7 @@ cdef class Window: Creates a Window object that uses the same window data from the :mod:`pygame.display` module, created upon calling :func:`pygame.display.set_mode`. """ - cdef Window self = cls.__new__(cls) + cdef _Window self = cls.__new__(cls) cdef SDL_Window* window = pg_GetDefaultWindow() if not window: raise error() @@ -1123,10 +1125,18 @@ cdef class Image: cdef class Renderer: @classmethod - def from_window(cls, Window window): + def from_window(cls, window): + cdef Window _window + if isinstance(window,(_Window,Window)): + _window = window + else: + raise TypeError( + "Argument 'window' has incorrect type " + "(expected pygame.Window or pygame._sdl2._Window, got %s)"%window.__class__.__name__ + ) cdef Renderer self = cls.__new__(cls) - self._win = window - if window._is_borrowed: + self._win = _window + if self._win._is_borrowed: self._is_borrowed=1 else: raise error() @@ -1142,7 +1152,7 @@ cdef class Renderer: self._target = None return self - def __init__(self, Window window, int index=-1, + def __init__(self, window, int index=-1, int accelerated=-1, bint vsync=False, bint target_texture=False): """pygame object wrapping a 2D rendering context for a window @@ -1188,6 +1198,15 @@ cdef class Renderer: immediately, but lends well to the behavior of GPUs, as draw calls can be expensive on lower-end models. """ + cdef Window _window + if isinstance(window,(_Window,Window)): + _window = window + else: + raise TypeError( + "Argument 'window' has incorrect type " + "(expected pygame.Window or pygame._sdl2._Window, got %s)"%window.__class__.__name__ + ) + # https://wiki.libsdl.org/SDL_CreateRenderer # https://wiki.libsdl.org/SDL_RendererFlags flags = 0 @@ -1198,14 +1217,14 @@ cdef class Renderer: if target_texture: flags |= _SDL_RENDERER_TARGETTEXTURE - self._renderer = SDL_CreateRenderer(window._win, index, flags) + 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._win = _window self._is_borrowed=0 def __dealloc__(self): diff --git a/src_c/include/_pygame.h b/src_c/include/_pygame.h index e16f7e4be8..7e863a0580 100644 --- a/src_c/include/_pygame.h +++ b/src_c/include/_pygame.h @@ -459,6 +459,21 @@ typedef struct pgColorObject pgColorObject; #define import_pygame_math() IMPORT_PYGAME_MODULE(math) #endif /* PYGAMEAPI_MATH_INTERNAL */ +/* + * Window module + */ +typedef struct { + PyObject_HEAD SDL_Window *_win; + SDL_bool _is_borrowed; +} pgWindowObject; + +#ifndef PYGAMEAPI_WINDOW_INTERNAL +#define pgWindow_Type (*(PyTypeObject *)PYGAMEAPI_GET_SLOT(_window, 0)) +#define pgWindow_Check(x) \ + (PyObject_IsInstance((x), (PyObject *)&pgWindow_Type)) +#define import_pygame_window() IMPORT_PYGAME_MODULE(_window) +#endif + #define IMPORT_PYGAME_MODULE _IMPORT_PYGAME_MODULE /* @@ -478,7 +493,8 @@ PYGAMEAPI_DEFINE_SLOTS(rwobject); PYGAMEAPI_DEFINE_SLOTS(pixelarray); PYGAMEAPI_DEFINE_SLOTS(color); PYGAMEAPI_DEFINE_SLOTS(math); -#else /* ~PYGAME_H */ +PYGAMEAPI_DEFINE_SLOTS(_window); +#else /* ~PYGAME_H */ PYGAMEAPI_EXTERN_SLOTS(base); PYGAMEAPI_EXTERN_SLOTS(rect); PYGAMEAPI_EXTERN_SLOTS(cdrom); @@ -491,6 +507,8 @@ PYGAMEAPI_EXTERN_SLOTS(rwobject); PYGAMEAPI_EXTERN_SLOTS(pixelarray); PYGAMEAPI_EXTERN_SLOTS(color); PYGAMEAPI_EXTERN_SLOTS(math); +PYGAMEAPI_EXTERN_SLOTS(_window); + #endif /* ~PYGAME_H */ #endif /* PYGAME_H */ diff --git a/src_c/static.c b/src_c/static.c index df6bae3581..f1e508415b 100644 --- a/src_c/static.c +++ b/src_c/static.c @@ -5,6 +5,7 @@ #define PYGAMEAPI_JOYSTICK_INTERNAL #define PYGAMEAPI_BASE_INTERNAL #define PYGAMEAPI_SURFACE_INTERNAL +#define PYGAMEAPI_WINDOW_INTERNAL #define pgSurface_New(surface) (pgSurfaceObject *)pgSurface_New2((surface), 1) #define pgSurface_NewNoOwn(surface) \ @@ -155,6 +156,9 @@ PyInit_gfxdraw(void); PyMODINIT_FUNC PyInit_audio(void); +PyMODINIT_FUNC +PyInit__window(void); + // pygame_static module void @@ -283,6 +287,8 @@ PyInit_pygame_static() load_submodule("pygame.mixer", PyInit_mixer_music(), "music"); + load_submodule("pygame._window", PyInit__window(), "_window"); + return PyModule_Create(&mod_pygame_static); } @@ -397,3 +403,5 @@ PyInit_pygame_static() #undef MAX #undef MIN #include "scale2x.c" + +#include "window.c" diff --git a/src_c/window.c b/src_c/window.c new file mode 100644 index 0000000000..c0a2cf5051 --- /dev/null +++ b/src_c/window.c @@ -0,0 +1,803 @@ +#define PYGAMEAPI_WINDOW_INTERNAL + +#include "pygame.h" + +#include "pgcompat.h" + +#include "doc/sdl2_video_doc.h" + +#ifndef PYGAMEAPI_DISPLAY_INTERNAL // to pass the static check +// Copied from display.c +#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"; + +// Copied from display.c +static void +pg_close_file(PyObject *fileobj) +{ + PyObject *result = PyObject_CallMethod(fileobj, "close", NULL); + if (result) { + Py_DECREF(result); + } + else { + PyErr_Clear(); + } +} + +// Copied from display.c +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; +} + +#endif // PYGAMEAPI_DISPLAY_INTERNAL + +static PyTypeObject pgWindow_Type; + +#define pgWindow_Check(x) \ + (PyObject_IsInstance((x), (PyObject *)&pgWindow_Type)) + +static PyObject * +get_grabbed_window(PyObject *self, PyObject *_null) +{ + SDL_Window *grabbed = SDL_GetGrabbedWindow(); + PyObject *win_obj = NULL; + if (grabbed) { + win_obj = SDL_GetWindowData(grabbed, "pg_window"); + if (!win_obj) { + Py_RETURN_NONE; + } + Py_INCREF(win_obj); + return win_obj; + } + Py_RETURN_NONE; +} + +static PyObject * +window_destroy(pgWindowObject *self, PyObject *_null) +{ + if (self->_win) { + SDL_DestroyWindow(self->_win); + self->_win = NULL; + } + Py_RETURN_NONE; +} + +static PyObject * +window_set_windowed(pgWindowObject *self, PyObject *_null) +{ + if (SDL_SetWindowFullscreen(self->_win, 0)) { + return RAISE(pgExc_SDLError, SDL_GetError()); + } + Py_RETURN_NONE; +} + +static PyObject * +window_set_fullscreen(pgWindowObject *self, PyObject *args, PyObject *kwargs) +{ + SDL_bool desktop = SDL_FALSE; + int flags = SDL_WINDOW_FULLSCREEN; + char *kwids[] = {"desktop", NULL}; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|p", kwids, &desktop)) { + return NULL; + } + if (desktop) { + flags = SDL_WINDOW_FULLSCREEN_DESKTOP; + } + if (SDL_SetWindowFullscreen(self->_win, flags)) { + return RAISE(pgExc_SDLError, SDL_GetError()); + } + Py_RETURN_NONE; +} + +static PyObject * +window_focus(pgWindowObject *self, PyObject *args, PyObject *kwargs) +{ + SDL_bool input_only = SDL_FALSE; + char *kwids[] = {"input_only", NULL}; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|p", kwids, &input_only)) { + return NULL; + } + if (input_only) { + if (SDL_SetWindowInputFocus(self->_win)) { + return RAISE(pgExc_SDLError, SDL_GetError()); + } + } + else { + SDL_RaiseWindow(self->_win); + } + Py_RETURN_NONE; +} + +static PyObject * +window_hide(pgWindowObject *self, PyObject *_null) +{ + SDL_HideWindow(self->_win); + Py_RETURN_NONE; +} + +static PyObject * +window_show(pgWindowObject *self, PyObject *_null) +{ + SDL_ShowWindow(self->_win); + Py_RETURN_NONE; +} + +static PyObject * +window_restore(pgWindowObject *self, PyObject *_null) +{ + SDL_RestoreWindow(self->_win); + Py_RETURN_NONE; +} + +static PyObject * +window_maximize(pgWindowObject *self, PyObject *_null) +{ + SDL_MaximizeWindow(self->_win); + Py_RETURN_NONE; +} + +static PyObject * +window_minimize(pgWindowObject *self, PyObject *_null) +{ + SDL_MinimizeWindow(self->_win); + Py_RETURN_NONE; +} + +static PyObject * +window_set_modal_for(pgWindowObject *self, PyObject *arg) +{ + if (!pgWindow_Check(arg)) { + return RAISE(PyExc_TypeError, + "Argument to set_modal_for must be a Window."); + } + if (!SDL_SetWindowModalFor(self->_win, ((pgWindowObject *)arg)->_win)) { + return RAISE(pgExc_SDLError, SDL_GetError()); + } + Py_RETURN_NONE; +} + +static PyObject * +window_set_icon(pgWindowObject *self, PyObject *arg) +{ + if (!pgSurface_Check(arg)) { + return RAISE(PyExc_TypeError, + "Argument to set_icon must be a Surface."); + } + SDL_SetWindowIcon(self->_win, pgSurface_AsSurface(arg)); + Py_RETURN_NONE; +} + +static int +window_set_grab(pgWindowObject *self, PyObject *arg, void *v) +{ + int enable = PyObject_IsTrue(arg); + if (enable == -1) + return -1; + + SDL_SetWindowGrab(self->_win, enable); + + return 0; +} + +static PyObject * +window_get_grab(pgWindowObject *self, void *v) +{ + return PyBool_FromLong(SDL_GetWindowGrab(self->_win)); +} + +static int +window_set_title(pgWindowObject *self, PyObject *arg, void *v) +{ + const char *title; + if (!PyUnicode_Check(arg)) { + PyErr_SetString(PyExc_TypeError, + "Argument to set_title must be a str."); + return -1; + } + title = PyUnicode_AsUTF8(arg); + SDL_SetWindowTitle(self->_win, title); + return 0; +} + +static PyObject * +window_get_title(pgWindowObject *self, void *v) +{ + const char *title = SDL_GetWindowTitle(self->_win); + return PyUnicode_FromString(title); +} + +static int +window_set_resizable(pgWindowObject *self, PyObject *arg, void *v) +{ + int enable = PyObject_IsTrue(arg); + if (enable == -1) + return -1; + + SDL_SetWindowResizable(self->_win, enable); + + return 0; +} + +static PyObject * +window_get_resizable(pgWindowObject *self, void *v) +{ + return PyBool_FromLong(SDL_GetWindowFlags(self->_win) & + SDL_WINDOW_RESIZABLE); +} + +static int +window_set_borderless(pgWindowObject *self, PyObject *arg, void *v) +{ + int enable = PyObject_IsTrue(arg); + if (enable == -1) + return -1; + + SDL_SetWindowBordered(self->_win, !enable); + + return 0; +} + +static PyObject * +window_get_borderless(pgWindowObject *self, void *v) +{ + return PyBool_FromLong(SDL_GetWindowFlags(self->_win) & + SDL_WINDOW_BORDERLESS); +} + +static PyObject * +window_get_window_id(pgWindowObject *self, PyObject *_null) +{ + Uint32 window_id = SDL_GetWindowID(self->_win); + if (!window_id) { + return RAISE(pgExc_SDLError, SDL_GetError()); + } + return PyLong_FromLong(window_id); +} + +static int +window_set_size(pgWindowObject *self, PyObject *arg, void *v) +{ + int w, h; + + if (!pg_TwoIntsFromObj(arg, &w, &h)) { + PyErr_SetString(PyExc_TypeError, "invalid size argument"); + return -1; + } + + if (w <= 0 || h <= 0) { + PyErr_SetString( + PyExc_ValueError, + "width or height should not be less than or equal to zero."); + return -1; + } + + SDL_SetWindowSize(self->_win, w, h); + + return 0; +} + +static PyObject * +window_get_size(pgWindowObject *self, void *v) +{ + int w, h; + PyObject *out = NULL; + + SDL_GetWindowSize(self->_win, &w, &h); + out = Py_BuildValue("(ii)", w, h); + + if (!out) + return NULL; + + return out; +} + +static int +window_set_position(pgWindowObject *self, PyObject *arg, void *v) +{ + int x, y; + + if (PyLong_Check(arg)) { + x = y = PyLong_AsLong(arg); + if (x != SDL_WINDOWPOS_CENTERED && x != SDL_WINDOWPOS_UNDEFINED) { + PyErr_SetString(PyExc_TypeError, "invalid position argument"); + return -1; + } + } + else if (!pg_TwoIntsFromObj(arg, &x, &y)) { + PyErr_SetString(PyExc_TypeError, "invalid position argument"); + return -1; + } + + SDL_SetWindowPosition(self->_win, x, y); + + return 0; +} + +static PyObject * +window_get_position(pgWindowObject *self, void *v) +{ + int x, y; + PyObject *out = NULL; + + SDL_GetWindowPosition(self->_win, &x, &y); + out = Py_BuildValue("(ii)", x, y); + + if (!out) + return NULL; + + return out; +} + +static int +window_set_opacity(pgWindowObject *self, PyObject *arg, void *v) +{ + float opacity; + opacity = (float)PyFloat_AsDouble(arg); + if (PyErr_Occurred()) { + return -1; + } + if (SDL_SetWindowOpacity(self->_win, opacity)) { + PyErr_SetString(pgExc_SDLError, SDL_GetError()); + return -1; + } + return 0; +} + +static PyObject * +window_get_opacity(pgWindowObject *self, void *v) +{ + float opacity; + if (SDL_GetWindowOpacity(self->_win, &opacity)) { + return RAISE(pgExc_SDLError, SDL_GetError()); + } + return PyFloat_FromDouble((double)opacity); +} + +static PyObject * +window_get_display_index(pgWindowObject *self, PyObject *_null) +{ + int index = SDL_GetWindowDisplayIndex(self->_win); + if (index < 0) { + return RAISE(pgExc_SDLError, SDL_GetError()); + } + return PyLong_FromLong(index); +} + +static PyObject * +mouse_get_relative_mode(pgWindowObject *self, void *v) +{ + return PyBool_FromLong(SDL_GetRelativeMouseMode()); +} + +static int +mouse_set_relative_mode(pgWindowObject *self, PyObject *arg, void *v) +{ + SDL_bool mode = SDL_FALSE; + if (PyObject_IsTrue(arg)) { + mode = SDL_TRUE; + } + if (SDL_SetRelativeMouseMode(mode)) { + PyErr_SetString(pgExc_SDLError, SDL_GetError()); + return -1; + } + return 0; +} + +static void +window_dealloc(pgWindowObject *self, PyObject *_null) +{ + if (!self->_is_borrowed && self->_win) { + SDL_DestroyWindow(self->_win); + } + Py_TYPE(self)->tp_free(self); +} + +static int +window_init(pgWindowObject *self, PyObject *args, PyObject *kwargs) +{ + char *title = "pygame window"; + PyObject *size = NULL; + int size_w = 640, size_h = 480; + PyObject *position = NULL; + int pos_x = SDL_WINDOWPOS_UNDEFINED; + int pos_y = SDL_WINDOWPOS_UNDEFINED; + Uint32 flags = 0; + SDL_Window *_win = NULL; + + Py_ssize_t dict_pos = 0; + PyObject *_key, *_value, *_kw; + const char *_key_str; + int _value_bool; + + _kw = PyDict_New(); + if (!_kw) + return -1; + + if (kwargs) { + while (PyDict_Next(kwargs, &dict_pos, &_key, &_value)) { + if (!PyUnicode_Check(_key)) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + return -1; + } + + _key_str = PyUnicode_AsUTF8(_key); + if (!_key_str) + return -1; + + if (!strcmp(_key_str, "title") || !strcmp(_key_str, "size") || + !strcmp(_key_str, "position")) { + PyDict_SetItem(_kw, _key, _value); + } + + // handle **flags + else { + _value_bool = PyObject_IsTrue(_value); + if (_value_bool == -1) + return -1; + + if (!strcmp(_key_str, "opengl")) { + if (_value_bool) + flags |= SDL_WINDOW_OPENGL; + } + else if (!strcmp(_key_str, "fullscreen")) { + if (_value_bool) + flags |= SDL_WINDOW_FULLSCREEN; + } + else if (!strcmp(_key_str, "fullscreen_desktop")) { + if (_value_bool) + flags |= SDL_WINDOW_FULLSCREEN_DESKTOP; + } + else if (!strcmp(_key_str, "hidden")) { + if (_value_bool) + flags |= SDL_WINDOW_HIDDEN; + } + else if (!strcmp(_key_str, "borderless")) { + if (_value_bool) + flags |= SDL_WINDOW_BORDERLESS; + } + else if (!strcmp(_key_str, "resizable")) { + if (_value_bool) + flags |= SDL_WINDOW_RESIZABLE; + } + else if (!strcmp(_key_str, "minimized")) { + if (_value_bool) + flags |= SDL_WINDOW_MINIMIZED; + } + else if (!strcmp(_key_str, "maximized")) { + if (_value_bool) + flags |= SDL_WINDOW_MAXIMIZED; + } + else if (!strcmp(_key_str, "input_grabbed")) { + if (_value_bool) +#if SDL_VERSION_ATLEAST(2, 0, 16) + flags |= SDL_WINDOW_MOUSE_GRABBED; +#else + flags |= SDL_WINDOW_INPUT_GRABBED; +#endif + } + else if (!strcmp(_key_str, "input_focus")) { + if (_value_bool) { + flags |= SDL_WINDOW_INPUT_FOCUS; + } + } + else if (!strcmp(_key_str, "mouse_focus")) { + if (_value_bool) { + flags |= SDL_WINDOW_MOUSE_FOCUS; + } + } + else if (!strcmp(_key_str, "foreign")) { + if (_value_bool) { + flags |= SDL_WINDOW_FOREIGN; + } + } + else if (!strcmp(_key_str, "allow_high_dpi")) { + if (_value_bool) { + flags |= SDL_WINDOW_ALLOW_HIGHDPI; + } + } + else if (!strcmp(_key_str, "mouse_capture")) { + if (_value_bool) + flags |= SDL_WINDOW_MOUSE_CAPTURE; + } + else if (!strcmp(_key_str, "always_on_top")) { + if (_value_bool) + flags |= SDL_WINDOW_ALWAYS_ON_TOP; + } + else if (!strcmp(_key_str, "skip_taskbar")) { + if (_value_bool) + flags |= SDL_WINDOW_SKIP_TASKBAR; + } + else if (!strcmp(_key_str, "utility")) { + if (_value_bool) + flags |= SDL_WINDOW_UTILITY; + } + else if (!strcmp(_key_str, "tooltip")) { + if (_value_bool) + flags |= SDL_WINDOW_TOOLTIP; + } + else if (!strcmp(_key_str, "popup_menu")) { + if (_value_bool) + flags |= SDL_WINDOW_POPUP_MENU; + } + else if (!strcmp(_key_str, "vulkan")) { + if (_value_bool) + flags |= SDL_WINDOW_VULKAN; + } + else { + PyErr_Format(PyExc_TypeError, + "__init__ got an unexpected flag \'%s\'", + _key_str); + return -1; + } + } + } + } + + char *kwids[] = {"title", "size", "position", NULL}; + if (!PyArg_ParseTupleAndKeywords(args, _kw, "|sOO", kwids, &title, &size, + &position)) { + return -1; + } + + if (size) { + if (!pg_TwoIntsFromObj(size, &size_w, &size_h)) { + PyErr_SetString(PyExc_TypeError, "invalid size argument"); + return -1; + } + } + + if (size_w <= 0 || size_h <= 0) { + PyErr_SetString( + PyExc_ValueError, + "width or height should not be less than or equal to zero."); + return -1; + } + + if (position) { + if (Py_TYPE(position) == &PyLong_Type) { + pos_x = pos_y = PyLong_AsLong(position); + if (pos_x != SDL_WINDOWPOS_CENTERED && + pos_x != SDL_WINDOWPOS_UNDEFINED) { + PyErr_SetString(PyExc_TypeError, "invalid positon argument"); + return -1; + } + } + else if (!pg_TwoIntsFromObj(position, &pos_x, &pos_y)) { + PyErr_SetString(PyExc_TypeError, "invalid positon argument"); + return -1; + } + } + + _win = SDL_CreateWindow(title, pos_x, pos_y, size_w, size_h, flags); + if (!_win) { + PyErr_SetString(pgExc_SDLError, SDL_GetError()); + return -1; + } + self->_win = _win; + self->_is_borrowed = SDL_FALSE; + + SDL_SetWindowData(_win, "pg_window", self); + + PyObject *icon = pg_display_resource(icon_defaultname); + if (!icon) { + return -1; + } + if (icon_colorkey != -1) { + if (SDL_SetColorKey(pgSurface_AsSurface(icon), SDL_TRUE, + icon_colorkey) < 0) { + PyErr_SetString(pgExc_SDLError, SDL_GetError()); + return -1; + } + } + SDL_SetWindowIcon(self->_win, pgSurface_AsSurface(icon)); + + return 0; +} + +static PyObject * +window_from_display_module(PyTypeObject *cls, PyObject *_null) +{ + SDL_Window *window; + pgWindowObject *self; + window = pg_GetDefaultWindow(); + if (!window) { + return RAISE(pgExc_SDLError, SDL_GetError()); + } + + self = (pgWindowObject *)(cls->tp_new(cls, NULL, NULL)); + self->_win = window; + self->_is_borrowed = SDL_TRUE; + SDL_SetWindowData(window, "pg_window", self); + return (PyObject *)self; +} + +static PyMethodDef window_methods[] = { + {"destroy", (PyCFunction)window_destroy, METH_NOARGS, + DOC_SDL2_VIDEO_WINDOW_DESTROY}, + {"set_windowed", (PyCFunction)window_set_windowed, METH_NOARGS, + DOC_SDL2_VIDEO_WINDOW_SETWINDOWED}, + {"set_fullscreen", (PyCFunction)window_set_fullscreen, + METH_VARARGS | METH_KEYWORDS, DOC_SDL2_VIDEO_WINDOW_SETFULLSCREEN}, + {"focus", (PyCFunction)window_focus, METH_VARARGS | METH_KEYWORDS, + DOC_SDL2_VIDEO_WINDOW_FOCUS}, + {"hide", (PyCFunction)window_hide, METH_NOARGS, + DOC_SDL2_VIDEO_WINDOW_HIDE}, + {"show", (PyCFunction)window_show, METH_NOARGS, + DOC_SDL2_VIDEO_WINDOW_SHOW}, + {"restore", (PyCFunction)window_restore, METH_NOARGS, + DOC_SDL2_VIDEO_WINDOW_RESTORE}, + {"maximize", (PyCFunction)window_maximize, METH_NOARGS, + DOC_SDL2_VIDEO_WINDOW_MAXIMIZE}, + {"minimize", (PyCFunction)window_minimize, METH_NOARGS, + DOC_SDL2_VIDEO_WINDOW_MINIMIZE}, + {"set_modal_for", (PyCFunction)window_set_modal_for, METH_O, + DOC_SDL2_VIDEO_WINDOW_SETMODALFOR}, + {"set_icon", (PyCFunction)window_set_icon, METH_O, + DOC_SDL2_VIDEO_WINDOW_SETICON}, + {"from_display_module", (PyCFunction)window_from_display_module, + METH_CLASS | METH_NOARGS, DOC_SDL2_VIDEO_WINDOW_FROMDISPLAYMODULE}, + {NULL, NULL, 0, NULL}}; + +static PyGetSetDef _window_getset[] = { + {"grab", (getter)window_get_grab, (setter)window_set_grab, + DOC_SDL2_VIDEO_WINDOW_GRAB, NULL}, + {"title", (getter)window_get_title, (setter)window_set_title, + DOC_SDL2_VIDEO_WINDOW_TITLE, NULL}, + {"resizable", (getter)window_get_resizable, (setter)window_set_resizable, + DOC_SDL2_VIDEO_WINDOW_RESIZABLE, NULL}, + {"borderless", (getter)window_get_borderless, + (setter)window_set_borderless, DOC_SDL2_VIDEO_WINDOW_BORDERLESS, NULL}, + {"relative_mouse", (getter)mouse_get_relative_mode, + (setter)mouse_set_relative_mode, DOC_SDL2_VIDEO_WINDOW_RELATIVEMOUSE, + NULL}, + {"size", (getter)window_get_size, (setter)window_set_size, + DOC_SDL2_VIDEO_WINDOW_SIZE, NULL}, + {"position", (getter)window_get_position, (setter)window_set_position, + DOC_SDL2_VIDEO_WINDOW_POSITION, NULL}, + {"opacity", (getter)window_get_opacity, (setter)window_set_opacity, + DOC_SDL2_VIDEO_WINDOW_OPACITY, NULL}, + {"display_index", (getter)window_get_display_index, NULL, + DOC_SDL2_VIDEO_WINDOW_DISPLAYINDEX, NULL}, + {"id", (getter)window_get_window_id, NULL, DOC_SDL2_VIDEO_WINDOW_ID, NULL}, + {NULL, 0, NULL, NULL, NULL} /* Sentinel */ +}; + +static PyTypeObject pgWindow_Type = { + PyVarObject_HEAD_INIT(NULL, 0).tp_name = "pygame._window.Window", + .tp_basicsize = sizeof(pgWindowObject), + .tp_dealloc = (destructor)window_dealloc, + .tp_doc = DOC_SDL2_VIDEO_WINDOW, + .tp_methods = window_methods, + .tp_init = (initproc)window_init, + .tp_new = PyType_GenericNew, + .tp_getset = _window_getset}; + +static PyMethodDef _window_methods[] = { + {"get_grabbed_window", (PyCFunction)get_grabbed_window, METH_NOARGS, + DOC_SDL2_VIDEO_GETGRABBEDWINDOW}, + {NULL, NULL, 0, NULL}}; + +MODINIT_DEFINE(_window) +{ + PyObject *module, *apiobj; + static void *c_api[PYGAMEAPI_WINDOW_NUMSLOTS]; + + static struct PyModuleDef _module = {PyModuleDef_HEAD_INIT, + "_window", + "docs_needed", + -1, + _window_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_rect(); + if (PyErr_Occurred()) { + return NULL; + } + + if (PyType_Ready(&pgWindow_Type) < 0) { + return NULL; + } + + /* create the module */ + module = PyModule_Create(&_module); + if (module == 0) { + return NULL; + } + + Py_INCREF(&pgWindow_Type); + if (PyModule_AddObject(module, "Window", (PyObject *)&pgWindow_Type)) { + Py_DECREF(&pgWindow_Type); + Py_DECREF(module); + return NULL; + } + + c_api[0] = &pgWindow_Type; + apiobj = encapsulate_api(c_api, "_window"); + if (PyModule_AddObject(module, PYGAMEAPI_LOCAL_ENTRY, apiobj)) { + Py_XDECREF(apiobj); + Py_DECREF(module); + return NULL; + } + + return module; +} diff --git a/src_py/_sdl2/window.py b/src_py/_sdl2/window.py new file mode 100644 index 0000000000..6867ff7b80 --- /dev/null +++ b/src_py/_sdl2/window.py @@ -0,0 +1 @@ +from .video import _Window as Window # pylint: disable=wildcard-import