def __init__(self, *args):
# 'default_color' is used by stella init, need to set before super
self.default_color = 0
self._colors = PygameColors()
super(PygameStella, self).__init__(*args)
# Test if 'PixelArray' is part of pygame
# pygame_cffi, may not have PixelArray
if has_numpy:
# Use a faster blit with a numpy array, if available.
self.driver_draw_display = self._draw_using_numpy_array
elif hasattr(pygame, 'PixelArray'):
self.driver_draw_display = self._draw_using_pixel_array
else:
self.driver_draw_display = self._draw_using_set_at
评论列表
文章目录