Commits

David Farler committed 2a1c6d7

Add optional logical_size to sdl2.ext.sprite.Renderer constructor

Comments (0)

Files changed (1)

sdl2/ext/sprite.py

 
 class Renderer(object):
     """SDL2-based renderer for windows and sprites."""
-    def __init__(self, target, index=-1,
+    def __init__(self, target, index=-1, logical_size=None,
                  flags=render.SDL_RENDERER_ACCELERATED):
         """Creates a new Renderer for the given target.
 
         else:
             raise TypeError("unsupported target type")
 
+        if logical_size is not None:
+            self.logical_size = logical_size
+
     def __del__(self):
         if self.renderer:
             render.SDL_DestroyRenderer(self.renderer)