code: def resize(self, dims):
          
          width, height = dims[:2]
          self.dims = (width, height)
          self.logger.debug("renderer reconfigured to %dx%d" % (
              width, height))
  
          # create PIL surface the size of the window
          # NOTE: pillow needs an RGB surface in order to draw with alpha
          # blending, not RGBA
          self.surface = Image.new('RGB', (width, height), color=0)
docs: Resize our drawing area to encompass a space defined by the
          given dimensions.