def create_software_renderer(self, surface):
        """Create a 2D software rendering context for a surface.

        Args:
            surface (Surface): The surface where rendering is done.

        Returns:
            Renderer: A 2D software rendering context.

        Raises:
            SDLError: If there was an error creating the renderer.
        """
        renderer = object.__new__(Renderer)
        renderer._ptr = self._ptr = check_ptr_err(lib.SDL_CreateSoftwareRenderer(surface._ptr))
        return renderer
def create_software_renderer ( self , surface ) : renderer = object . __new__ ( Renderer ) renderer . _ptr = self . _ptr = check_ptr_err ( lib . SDL_CreateSoftwareRenderer ( surface . _ptr ) ) return renderer
Create a 2D software rendering context for a surface.

        Args:
            surface (Surface): The surface where rendering is done.

        Returns:
            Renderer: A 2D software rendering context.

        Raises:
            SDLError: If there was an error creating the renderer.